apply same fix to MQTT-out node

This commit is contained in:
Steve-Mcl 2022-10-22 10:30:04 +01:00
parent a08c75aab7
commit c396901c3e

View File

@ -1297,9 +1297,9 @@ module.exports = function(RED) {
node.status({fill:"green",shape:"dot",text:"node-red:common.status.connected"}); node.status({fill:"green",shape:"dot",text:"node-red:common.status.connected"});
} }
node.brokerConn.register(node); node.brokerConn.register(node);
node.on('close', function(done) { node.on('close', function(removed, done) {
if (node.brokerConn) { if (node.brokerConn) {
node.brokerConn.deregister(node,done); node.brokerConn.deregister(node, done, removed)
node.brokerConn = null; node.brokerConn = null;
} else { } else {
done(); done();