From cd6dbedfa2e50da899e1f78c74f0e5cd71c239d5 Mon Sep 17 00:00:00 2001 From: Pagan Gazzard Date: Thu, 12 Mar 2015 12:04:31 +0000 Subject: [PATCH] Be very careful about marking an update attempt finished --- src/application.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/application.coffee b/src/application.coffee index 24f356da..53479906 100644 --- a/src/application.coffee +++ b/src/application.coffee @@ -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 ->