[Philips Hue] retry if command failed due to api rate limit.

This commit is contained in:
Khaos Tian
2015-08-28 21:49:16 -07:00
parent 2ca6410e0a
commit bf2216209d
+6
View File
@@ -216,8 +216,14 @@ PhilipsHueAccessory.prototype = {
that.log(device.name + ", characteristic: " + characteristic + ", value: " + value + "."); that.log(device.name + ", characteristic: " + characteristic + ", value: " + value + ".");
} }
else { else {
if (err.code == "ECONNRESET") {
setTimeout(function() {
that.executeChange(api, device, characteristic, value);
}, 300);
} else {
that.log(err); that.log(err);
} }
}
}); });
}, },
// Get Services // Get Services