Be very careful about marking an update attempt finished

This commit is contained in:
Pagan Gazzard 2015-03-12 12:04:31 +00:00 committed by Pablo Carranza Vélez
parent c8df0b2f9e
commit cd6dbedfa2

View File

@ -275,7 +275,8 @@ exports.update = update = ->
if currentlyUpdating is 2
# If an update is required then schedule it
setTimeout(update)
# Set the updating as finished
.finally ->
# Set the updating as finished in its own block, so it never has to worry about other code stopping this.
currentlyUpdating = 0
getDeviceID = do ->