mirror of https://github.com/node-red/node-red.git
Fix mqtt nodes not reconnected on modified-flows deploy
parent
b3ce0c0079
commit
ce57ba80eb
|
@ -718,9 +718,10 @@ module.exports = function(RED) {
|
|||
node.deregister = function(mqttNode, done, autoDisconnect) {
|
||||
delete node.users[mqttNode.id];
|
||||
if (autoDisconnect && !node.closing && node.connected && Object.keys(node.users).length === 0) {
|
||||
node.disconnect();
|
||||
}
|
||||
node.disconnect(done);
|
||||
} else {
|
||||
done();
|
||||
}
|
||||
};
|
||||
node.canConnect = function() {
|
||||
return !node.connected && !node.connecting;
|
||||
|
|
Loading…
Reference in New Issue