mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
clear tcpget node status if user changes target per message
This commit is contained in:
parent
6382564727
commit
f488869635
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user