try to connect to next type when connection is refused (server not listening on 5223)
This commit is contained in:
		
							parent
							
								
									7ca670a303
								
							
						
					
					
						commit
						4a06659912
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		|  | @ -472,7 +472,12 @@ class NonBlockingTcp(PlugIn, IdleObject): | ||||||
| 			return | 			return | ||||||
| 
 | 
 | ||||||
| 		if received is None: | 		if received is None: | ||||||
| 			if errnum != 0: | 			if self.state == 0 and errnum == errno.ECONNREFUSED: | ||||||
|  | 				# We tried to connect to a port that did't listen. | ||||||
|  | 				log.error("Connection to %s refused: %s [%d]", self.getName(), errtxt, errnum) | ||||||
|  | 				self.pollend(retry=True) | ||||||
|  | 				return | ||||||
|  | 			elif errnum != 0: | ||||||
| 				self.DEBUG(errtxt, 'error') | 				self.DEBUG(errtxt, 'error') | ||||||
| 				log.error("Connection to %s lost: %s [%d]", self.getName(), errtxt, errnum) | 				log.error("Connection to %s lost: %s [%d]", self.getName(), errtxt, errnum) | ||||||
| 				self._owner.disconnected() | 				self._owner.disconnected() | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue