1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

narrowing in on tcpget fix, reconnect but don't resend.

to address issue #759
This commit is contained in:
Dave Conway-Jones 2015-12-01 13:41:39 +00:00
parent a47ad4842a
commit 090d52d678

View File

@ -494,17 +494,17 @@ module.exports = function(RED) {
client.on('timeout',function() {
//console.log("TIMEOUT");
node.connected = false;
node.status({fill:"grey",shape:"dot"});
node.warn(RED._("tcpin.errors.connect-timeout"));
node.status({fill:"grey",shape:"dot",text:"tcpin.errors.connect-timeout"});
//node.warn(RED._("tcpin.errors.connect-timeout"));
if (client) {
client.end();
setTimeout(function() {
//client.end();
//setTimeout(function() {
client.connect(port, host, function() {
node.connected = true;
node.status({fill:"green",shape:"dot",text:"common.status.connected"});
client.write(msg.payload);
//client.write(msg.payload);
});
},reconnectTime);
//},reconnectTime);
}
});
}