Handle connect and reconnect event in the same way

This commit is contained in:
Olivier Verhaegen 2023-04-17 15:16:38 +02:00 committed by GitHub
parent c3628b6d91
commit 880a21dc6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -195,9 +195,11 @@ module.exports = function(RED) {
});
node.client.on("reconnect", function(sessionId, numOfRetries) {
node.closing = false;
node.connecting = false;
node.connected = true;
node.sessionId = sessionId;
callback();
node.log("Reconnected to STOMP server", {sessionId: node.sessionId, url: `${node.options.address}:${node.options.port}`, protocolVersion: node.options.protocolVersion, retries: numOfRetries});
setStatusConnected(node, true);