Gestisci timeout sui client TCP
parent
597cc781c4
commit
c98b5f396f
|
|
@ -135,6 +135,10 @@ module.exports = function(RED) {
|
|||
buffer = null;
|
||||
}
|
||||
});
|
||||
client.on('timeout', function() {
|
||||
node.log(RED._("tcpin.errors.timeout",{port:node.port}));
|
||||
client.end();
|
||||
});
|
||||
client.on('close', function() {
|
||||
delete connectionPool[id];
|
||||
node.connected = false;
|
||||
|
|
@ -310,6 +314,10 @@ module.exports = function(RED) {
|
|||
node.status({});
|
||||
node.connected = false;
|
||||
});
|
||||
client.on('timeout', function() {
|
||||
node.log(RED._("tcpin.errors.timeout",{port:node.port}));
|
||||
client.end();
|
||||
});
|
||||
client.on('close', function() {
|
||||
node.status({fill:"red",shape:"ring",text:"common.status.disconnected"});
|
||||
node.connected = false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue