Clear MQTT Connection watchdog on error

This commit is contained in:
Nick O'Leary
2014-04-19 22:17:14 +01:00
parent 4ae5f34d2e
commit eee8f89146
2 changed files with 12 additions and 0 deletions

View File

@@ -34,6 +34,7 @@ module.exports = {
connections[id] = function() {
var uid = (1+Math.random()*4294967295).toString(16);
var client = mqtt.createClient(port,broker);
client.uid = uid;
client.setMaxListeners(0);
var options = {keepalive:15};
options.clientId = clientid || 'mqtt_' + (1+Math.random()*4294967295).toString(16);