mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
parent
40ad4bdbd8
commit
48958f392f
@ -574,15 +574,17 @@ module.exports = function(RED) {
|
|||||||
|
|
||||||
clients[connection_id].client.on('timeout',function() {
|
clients[connection_id].client.on('timeout',function() {
|
||||||
//console.log("TIMEOUT");
|
//console.log("TIMEOUT");
|
||||||
|
if (clients[connection_id]) {
|
||||||
clients[connection_id].connected = false;
|
clients[connection_id].connected = false;
|
||||||
node.status({fill:"grey",shape:"dot",text:"tcpin.errors.connect-timeout"});
|
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 (clients[connection_id] && clients[connection_id].client) {
|
if (clients[connection_id].client) {
|
||||||
clients[connection_id].client.connect(port, host, function() {
|
clients[connection_id].client.connect(port, host, function() {
|
||||||
clients[connection_id].connected = true;
|
clients[connection_id].connected = true;
|
||||||
node.status({fill:"green",shape:"dot",text:"common.status.connected"});
|
node.status({fill:"green",shape:"dot",text:"common.status.connected"});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user