From 756038525c7a5c8ea1a44a00035c019821f0756a Mon Sep 17 00:00:00 2001 From: Guido Longoni Date: Wed, 6 May 2026 12:25:37 +0200 Subject: [PATCH] Forza chiusura client TCP in timeout --- red/tcp/tcp.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/red/tcp/tcp.js b/red/tcp/tcp.js index 69c0b20..74258fd 100644 --- a/red/tcp/tcp.js +++ b/red/tcp/tcp.js @@ -137,7 +137,7 @@ module.exports = function(RED) { }); client.on('timeout', function() { node.log(RED._("tcpin.errors.timeout",{port:node.port})); - client.end(); + client.destroy(); }); client.on('close', function() { delete connectionPool[id]; @@ -316,7 +316,7 @@ module.exports = function(RED) { }); client.on('timeout', function() { node.log(RED._("tcpin.errors.timeout",{port:node.port})); - client.end(); + client.destroy(); }); client.on('close', function() { node.status({fill:"red",shape:"ring",text:"common.status.disconnected"});