Forza chiusura client TCP in timeout

master
Guido Longoni 2026-05-06 12:25:37 +02:00
parent c98b5f396f
commit 756038525c
1 changed files with 2 additions and 2 deletions

View File

@ -137,7 +137,7 @@ module.exports = function(RED) {
}); });
client.on('timeout', function() { client.on('timeout', function() {
node.log(RED._("tcpin.errors.timeout",{port:node.port})); node.log(RED._("tcpin.errors.timeout",{port:node.port}));
client.end(); client.destroy();
}); });
client.on('close', function() { client.on('close', function() {
delete connectionPool[id]; delete connectionPool[id];
@ -316,7 +316,7 @@ module.exports = function(RED) {
}); });
client.on('timeout', function() { client.on('timeout', function() {
node.log(RED._("tcpin.errors.timeout",{port:node.port})); node.log(RED._("tcpin.errors.timeout",{port:node.port}));
client.end(); client.destroy();
}); });
client.on('close', function() { client.on('close', function() {
node.status({fill:"red",shape:"ring",text:"common.status.disconnected"}); node.status({fill:"red",shape:"ring",text:"common.status.disconnected"});