Gestisci timeout sui client TCP
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user