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:
parent
a47ad4842a
commit
090d52d678
@ -494,17 +494,17 @@ module.exports = function(RED) {
|
|||||||
client.on('timeout',function() {
|
client.on('timeout',function() {
|
||||||
//console.log("TIMEOUT");
|
//console.log("TIMEOUT");
|
||||||
node.connected = false;
|
node.connected = false;
|
||||||
node.status({fill:"grey",shape:"dot"});
|
node.status({fill:"grey",shape:"dot",text:"tcpin.errors.connect-timeout"});
|
||||||
node.warn(RED._("tcpin.errors.connect-timeout"));
|
//node.warn(RED._("tcpin.errors.connect-timeout"));
|
||||||
if (client) {
|
if (client) {
|
||||||
client.end();
|
//client.end();
|
||||||
setTimeout(function() {
|
//setTimeout(function() {
|
||||||
client.connect(port, host, function() {
|
client.connect(port, host, function() {
|
||||||
node.connected = true;
|
node.connected = true;
|
||||||
node.status({fill:"green",shape:"dot",text:"common.status.connected"});
|
node.status({fill:"green",shape:"dot",text:"common.status.connected"});
|
||||||
client.write(msg.payload);
|
//client.write(msg.payload);
|
||||||
});
|
});
|
||||||
},reconnectTime);
|
//},reconnectTime);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user