[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

View File

@@ -216,7 +216,13 @@ PhilipsHueAccessory.prototype = {
that.log(device.name + ", characteristic: " + characteristic + ", value: " + value + ".");
}
else {
that.log(err);
if (err.code == "ECONNRESET") {
setTimeout(function() {
that.executeChange(api, device, characteristic, value);
}, 300);
} else {
that.log(err);
}
}
});
},