From c396901c3e9e028854081b39a5ea8a6b38e4a665 Mon Sep 17 00:00:00 2001 From: Steve-Mcl Date: Sat, 22 Oct 2022 10:30:04 +0100 Subject: [PATCH] apply same fix to MQTT-out node --- packages/node_modules/@node-red/nodes/core/network/10-mqtt.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/node_modules/@node-red/nodes/core/network/10-mqtt.js b/packages/node_modules/@node-red/nodes/core/network/10-mqtt.js index 444fb948a..3e789be7f 100644 --- a/packages/node_modules/@node-red/nodes/core/network/10-mqtt.js +++ b/packages/node_modules/@node-red/nodes/core/network/10-mqtt.js @@ -1297,9 +1297,9 @@ module.exports = function(RED) { node.status({fill:"green",shape:"dot",text:"node-red:common.status.connected"}); } node.brokerConn.register(node); - node.on('close', function(done) { + node.on('close', function(removed, done) { if (node.brokerConn) { - node.brokerConn.deregister(node,done); + node.brokerConn.deregister(node, done, removed) node.brokerConn = null; } else { done();