diff options
author | Miguel Jacq <mig@mig5.net> | 2018-02-25 12:31:32 +1100 |
---|---|---|
committer | Miguel Jacq <mig@mig5.net> | 2018-02-25 12:31:32 +1100 |
commit | cff267c09c8b265157de697fdca1f4e528ec82a0 (patch) | |
tree | caa448527a1bdd33fc23de989158a2bb7105647b /onionshare | |
parent | 9f0adc0fb96ce637f996ca44c1403556f3bcdba8 (diff) | |
download | onionshare-cff267c09c8b265157de697fdca1f4e528ec82a0.tar.gz onionshare-cff267c09c8b265157de697fdca1f4e528ec82a0.zip |
Revert the cancel feature that causes issues at least on macOS (#637)
Diffstat (limited to 'onionshare')
-rw-r--r-- | onionshare/onion.py | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/onionshare/onion.py b/onionshare/onion.py index 068648ba..887650c9 100644 --- a/onionshare/onion.py +++ b/onionshare/onion.py @@ -488,8 +488,8 @@ class Onion(object): auth_cookie = list(res.client_auth.values())[0] self.auth_string = 'HidServAuth {} {}'.format(onion_host, auth_cookie) + self.settings.save() if onion_host is not None: - self.settings.save() return onion_host else: raise TorErrorProtocolError(strings._('error_tor_protocol_error')) @@ -500,19 +500,13 @@ class Onion(object): """ common.log('Onion', 'cleanup') - # Cleanup the ephemeral onion services, if we have any - try: - onions = self.c.list_ephemeral_hidden_services() - for onion in onions: - try: - common.log('Onion', 'cleanup', 'trying to remove onion {}'.format(onion)) - self.c.remove_ephemeral_hidden_service(onion) - except: - common.log('Onion', 'cleanup', 'could not remove onion {}.. moving on anyway'.format(onion)) - pass - except: - pass - self.service_id = None + # Cleanup the ephemeral onion service + if self.service_id: + try: + self.c.remove_ephemeral_hidden_service(self.service_id) + except: + pass + self.service_id = None if stop_tor: # Stop tor process |