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