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

fix MQTT test fail due to birth sent before connection done

This commit is contained in:
Steve-Mcl 2022-08-12 18:23:07 +01:00
parent 5c6b8e9e50
commit 31b17faa2a

View File

@ -786,7 +786,9 @@ module.exports = function(RED) {
// Send any birth message
if (node.birthMessage) {
node.publish(node.birthMessage);
setTimeout(() => {
node.publish(node.birthMessage);
}, 1);
}
});
node._clientOn("reconnect", function() {