From f488869635fe1115f6895fdee08c6f52cea49557 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Tue, 23 Oct 2018 18:59:23 +0100 Subject: [PATCH] clear tcpget node status if user changes target per message --- packages/node_modules/@node-red/nodes/core/io/31-tcpin.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/node_modules/@node-red/nodes/core/io/31-tcpin.js b/packages/node_modules/@node-red/nodes/core/io/31-tcpin.js index 47b4bed7c..0389d6abd 100644 --- a/packages/node_modules/@node-red/nodes/core/io/31-tcpin.js +++ b/packages/node_modules/@node-red/nodes/core/io/31-tcpin.js @@ -244,6 +244,7 @@ module.exports = function(RED) { } RED.nodes.registerType("tcp in",TcpIn); + function TcpOut(n) { RED.nodes.createNode(this,n); this.host = n.host; @@ -419,6 +420,7 @@ module.exports = function(RED) { } RED.nodes.registerType("tcp out",TcpOut); + function TcpGet(n) { RED.nodes.createNode(this,n); this.server = n.server; @@ -459,6 +461,10 @@ module.exports = function(RED) { // the clients object will have: // clients[id].client, clients[id].msg, clients[id].timeout var connection_id = host + ":" + port; + if (connection_id !== node.last_id) { + node.status({}); + node.last_id = connection_id; + } clients[connection_id] = clients[connection_id] || { msgQueue: new Denque(), connected: false,