mirror of
				https://github.com/node-red/node-red-nodes.git
				synced 2025-03-01 10:37:43 +00:00 
			
		
		
		
	Handle connect and reconnect event in the same way
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							c3628b6d91
						
					
				
				
					commit
					880a21dc6e
				
			@@ -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);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user