Some bug fixes

This commit is contained in:
Zaid Abdulla committed 2016-09-06 23:53:46 -07:00
1 parent 5134f8419c
commit 46870db18d
3 files changed
+3 -7

No files matched your search

+1 -1
View File
@@ -453,7 +453,7 @@ listener = (httpRequest, httpResponse) ->
faults = {}
currentRequest.sessionData.faults ?= {}
for p, i in currentRequest.sessionData.provisions
for p, i in currentRequest.sessionData.provisions[0]
channel = currentRequest.sessionData.channels[i]
fault = faults[channel]
if not fault?
+2 -2
View File
@@ -254,8 +254,8 @@ listener = (request, response) ->
else if FAULTS_REGEX.test(urlParts.pathname)
if request.method == 'DELETE'
faultId = querystring.unescape(FAULTS_REGEX.exec(urlParts.pathname)[1])
deviceId = faultId.split(':', 1)
channel = faultId.slice(deviceId + 1)
deviceId = faultId.split(':', 1)[0]
channel = faultId.slice(deviceId.length + 1)
db.redisClient.del("#{deviceId}_faults", (err) ->
db.faultsCollection.remove({_id : faultId}, (err) ->
throw err if err
-4
View File
@@ -564,10 +564,6 @@ generateRpcRequest = (sessionData) ->
}
refreshDone = not rpcReq?
# Skip write if read isn't finished
sessionData.syncState.setValues.clear()
sessionData.syncState.instancesToDelete.clear()
sessionData.syncState.instancesToCreate.clear()
# Delete instance
syncState.instancesToDelete.forEach((instances, parent) ->