mirror of https://github.com/node-red/node-red.git
Merge pull request #4878 from node-red/4876-mqtt-status
Set status of mqtt nodes to "disconnected" when deregistered from brokerpull/4880/head
commit
a16c72b6a8
|
@ -742,6 +742,7 @@ module.exports = function(RED) {
|
|||
};
|
||||
|
||||
node.deregister = function(mqttNode, done, autoDisconnect) {
|
||||
setStatusDisconnected(mqttNode, false);
|
||||
delete node.users[mqttNode.id];
|
||||
if (autoDisconnect && !node.closing && node.connected && Object.keys(node.users).length === 0) {
|
||||
node.disconnect(done);
|
||||
|
|
Loading…
Reference in New Issue