mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	
				
					committed by
					
						 Dave Conway-Jones
						Dave Conway-Jones
					
				
			
			
				
	
			
			
			
						parent
						
							40ad4bdbd8
						
					
				
				
					commit
					48958f392f
				
			| @@ -574,14 +574,16 @@ module.exports = function(RED) { | ||||
|  | ||||
|                 clients[connection_id].client.on('timeout',function() { | ||||
|                     //console.log("TIMEOUT"); | ||||
|                     clients[connection_id].connected = false; | ||||
|                     node.status({fill:"grey",shape:"dot",text:"tcpin.errors.connect-timeout"}); | ||||
|                     //node.warn(RED._("tcpin.errors.connect-timeout")); | ||||
|                     if (clients[connection_id] && clients[connection_id].client) { | ||||
|                         clients[connection_id].client.connect(port, host, function() { | ||||
|                             clients[connection_id].connected = true; | ||||
|                             node.status({fill:"green",shape:"dot",text:"common.status.connected"}); | ||||
|                         }); | ||||
|                     if (clients[connection_id]) { | ||||
|                         clients[connection_id].connected = false; | ||||
|                         node.status({fill:"grey",shape:"dot",text:"tcpin.errors.connect-timeout"}); | ||||
|                         //node.warn(RED._("tcpin.errors.connect-timeout")); | ||||
|                         if (clients[connection_id].client) { | ||||
|                             clients[connection_id].client.connect(port, host, function() { | ||||
|                                 clients[connection_id].connected = true; | ||||
|                                 node.status({fill:"green",shape:"dot",text:"common.status.connected"}); | ||||
|                             }); | ||||
|                         } | ||||
|                     } | ||||
|                 }); | ||||
|             } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user