mirror of
				https://github.com/node-red/node-red-nodes.git
				synced 2025-03-01 10:37:43 +00:00 
			
		
		
		
	If not connected, do not try to disconnect
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							4cf1216845
						
					
				
				
					commit
					b2aea4da29
				
			| @@ -248,8 +248,8 @@ module.exports = function(RED) { | ||||
|             if (!node.client) { | ||||
|                 node.warn("Can't disconnect, connection not initialized."); | ||||
|                 callback(); | ||||
|             } else if (node.closing) { | ||||
|                 // Disconnection already in progress | ||||
|             } else if (node.closing || !node.connected) { | ||||
|                 // Disconnection already in progress or not connected | ||||
|                 callback(); | ||||
|             } else { | ||||
|                 waitDisconnect(node.client, 2000).then(() => { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user