only set tcp timeout if needs setting.

This commit is contained in:
Dave Conway-Jones 2015-08-15 22:16:48 +01:00
parent b555b014b8
commit 2d4979df4d
1 changed files with 1 additions and 1 deletions

View File

@ -393,7 +393,7 @@ module.exports = function(RED) {
}
if (!node.connected) {
client = net.Socket();
client.setTimeout(socketTimeout);
if (socketTimeout) { client.setTimeout(socketTimeout); }
//node.status({});
var host = node.server || msg.host;
var port = node.port || msg.port;