From 4c0c590791d56735b198f7115164f74e47dfdab5 Mon Sep 17 00:00:00 2001 From: Zaid Abdulla Date: Thu, 24 Jul 2014 03:51:53 +0300 Subject: [PATCH] Fixed bug where partial device update from a faulty task gets committed in the next inform. --- lib/update-device.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/update-device.coffee b/lib/update-device.coffee index c399e10..4b2a6ce 100644 --- a/lib/update-device.coffee +++ b/lib/update-device.coffee @@ -116,7 +116,7 @@ commitUpdates = (deviceId, deviceUpdates, commitQueue, callback) -> update['$set']["_customCommands.#{commandName}._timestamp"] = now processBatches = (cb) -> - if not commitQueue? + if not commitQueue processBatch(deviceUpdates) if deviceUpdates? return cb()