mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-14 00:39:33 -05:00
Let the Tor connection take a little longer (60s) if bridges are in use
This commit is contained in:
parent
661cf7f129
commit
890acf9f38
@ -264,8 +264,13 @@ class Onion(object):
|
|||||||
break
|
break
|
||||||
time.sleep(0.2)
|
time.sleep(0.2)
|
||||||
|
|
||||||
# Timeout after 45 seconds
|
# If using bridges, it might take a bit longer to connect to Tor
|
||||||
if time.time() - start_ts > 45:
|
if self.settings.get('tor_bridges_use_custom_bridges') or self.settings.get('tor_bridges_use_obfs4'):
|
||||||
|
connect_timeout = 60
|
||||||
|
else:
|
||||||
|
# Timeout after 45 seconds
|
||||||
|
connect_timeout = 45
|
||||||
|
if time.time() - start_ts > connect_timeout:
|
||||||
print("")
|
print("")
|
||||||
self.tor_proc.terminate()
|
self.tor_proc.terminate()
|
||||||
raise BundledTorTimeout(strings._('settings_error_bundled_tor_timeout'))
|
raise BundledTorTimeout(strings._('settings_error_bundled_tor_timeout'))
|
||||||
|
Loading…
Reference in New Issue
Block a user