apply same fix to MQTT-out node

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

View File

@ -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();