1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00

Bugfix: show connected state after reconnect

This commit is contained in:
Olivier Verhaegen 2023-04-07 09:26:05 +02:00 committed by GitHub
parent 6d4c865611
commit 2e5eced601
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,6 +57,10 @@ module.exports = function(RED) {
node.warn("reconnecting");
});
node.client.on("reconnect", function() {
node.status({fill:"green",shape:"dot",text:"connected"});
});
node.client.on("error", function(error) {
node.status({fill:"grey",shape:"dot",text:"error"});
node.warn(error);