handle ping missed in lan connecting

master
Kevin 2020-06-17 00:42:40 -05:00
parent 1f2c116b4b
commit c0b72f9007
1 changed files with 2 additions and 1 deletions

View File

@ -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: