handle ping missed in lan connecting

This commit is contained in:
Kevin 2020-06-17 00:42:40 -05:00
parent 1f2c116b4b
commit c0b72f9007

View File

@ -38,7 +38,8 @@ def _lan_work(peer: LANIP):
if identified_port.port != 0: if identified_port.port != 0:
break break
try: 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 identified_port.port = i
break break
except requests.exceptions.ConnectionError: except requests.exceptions.ConnectionError: