handle ping missed in lan connecting
This commit is contained in:
		
							parent
							
								
									1f2c116b4b
								
							
						
					
					
						commit
						c0b72f9007
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -38,7 +38,8 @@ def _lan_work(peer: LANIP): | |||
|             if identified_port.port != 0: | ||||
|                 break | ||||
|             try: | ||||
|                 if requests.get(f'http://{peer}:{i}/ping') == 'onionr!': | ||||
|                 if requests.get(f'http://{peer}:{i}/ping', timeout=1) == 'onionr!': | ||||
|                     print("Found", peer, i) | ||||
|                     identified_port.port = i | ||||
|                     break | ||||
|             except requests.exceptions.ConnectionError: | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue