mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-26 15:59:48 -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
|
||||
time.sleep(0.2)
|
||||
|
||||
# Timeout after 45 seconds
|
||||
if time.time() - start_ts > 45:
|
||||
# If using bridges, it might take a bit longer to connect to Tor
|
||||
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("")
|
||||
self.tor_proc.terminate()
|
||||
raise BundledTorTimeout(strings._('settings_error_bundled_tor_timeout'))
|
||||
|
Loading…
Reference in New Issue
Block a user