diff --git a/io/serialport/25-serial.js b/io/serialport/25-serial.js index efa296db..7f2402f4 100644 --- a/io/serialport/25-serial.js +++ b/io/serialport/25-serial.js @@ -230,10 +230,10 @@ module.exports = function(RED) { olderr = err.toString(); RED.log.error(RED._("serial.errors.error",{port:port,error:olderr})); } + obj.tout = setTimeout(function() { + setupSerial(); + }, settings.serialReconnectTime); } - obj.tout = setTimeout(function() { - setupSerial(); - }, settings.serialReconnectTime); }); obj.serial.on('error', function(err) { RED.log.error(RED._("serial.errors.error",{port:port,error:err.toString()})); diff --git a/io/serialport/package.json b/io/serialport/package.json index 5b35ecf5..0fc14439 100644 --- a/io/serialport/package.json +++ b/io/serialport/package.json @@ -1,6 +1,6 @@ { "name" : "node-red-node-serialport", - "version" : "0.0.4", + "version" : "0.0.5", "description" : "Node-RED nodes to talk to an serial port", "dependencies" : { "serialport" : "1.7.*"