Some bug fixes
This commit is contained in:
1 parent
5134f8419c
commit
46870db18d
3 files changed
+3
-7
No files matched your search
+1
-1
@@ -453,7 +453,7 @@ listener = (httpRequest, httpResponse) ->
|
|||||||
faults = {}
|
faults = {}
|
||||||
currentRequest.sessionData.faults ?= {}
|
currentRequest.sessionData.faults ?= {}
|
||||||
|
|
||||||
for p, i in currentRequest.sessionData.provisions
|
for p, i in currentRequest.sessionData.provisions[0]
|
||||||
channel = currentRequest.sessionData.channels[i]
|
channel = currentRequest.sessionData.channels[i]
|
||||||
fault = faults[channel]
|
fault = faults[channel]
|
||||||
if not fault?
|
if not fault?
|
||||||
|
|||||||
+2
-2
@@ -254,8 +254,8 @@ listener = (request, response) ->
|
|||||||
else if FAULTS_REGEX.test(urlParts.pathname)
|
else if FAULTS_REGEX.test(urlParts.pathname)
|
||||||
if request.method == 'DELETE'
|
if request.method == 'DELETE'
|
||||||
faultId = querystring.unescape(FAULTS_REGEX.exec(urlParts.pathname)[1])
|
faultId = querystring.unescape(FAULTS_REGEX.exec(urlParts.pathname)[1])
|
||||||
deviceId = faultId.split(':', 1)
|
deviceId = faultId.split(':', 1)[0]
|
||||||
channel = faultId.slice(deviceId + 1)
|
channel = faultId.slice(deviceId.length + 1)
|
||||||
db.redisClient.del("#{deviceId}_faults", (err) ->
|
db.redisClient.del("#{deviceId}_faults", (err) ->
|
||||||
db.faultsCollection.remove({_id : faultId}, (err) ->
|
db.faultsCollection.remove({_id : faultId}, (err) ->
|
||||||
throw err if err
|
throw err if err
|
||||||
|
|||||||
@@ -564,10 +564,6 @@ generateRpcRequest = (sessionData) ->
|
|||||||
}
|
}
|
||||||
|
|
||||||
refreshDone = not rpcReq?
|
refreshDone = not rpcReq?
|
||||||
# Skip write if read isn't finished
|
|
||||||
sessionData.syncState.setValues.clear()
|
|
||||||
sessionData.syncState.instancesToDelete.clear()
|
|
||||||
sessionData.syncState.instancesToCreate.clear()
|
|
||||||
|
|
||||||
# Delete instance
|
# Delete instance
|
||||||
syncState.instancesToDelete.forEach((instances, parent) ->
|
syncState.instancesToDelete.forEach((instances, parent) ->
|
||||||
|
|||||||
Reference in new issue
Block a user