diff options
author | Micah Lee <micah@micahflee.com> | 2020-12-13 12:12:29 -0800 |
---|---|---|
committer | Micah Lee <micah@micahflee.com> | 2020-12-13 12:12:29 -0800 |
commit | 71558afb57d1f3aa9ac747897dda636f371c6d01 (patch) | |
tree | 552e8ed86ea48b718e933a2a6a52b61a2ccceaeb /desktop | |
parent | fddc0826fe09390451bd3de1cc5114d652b35b63 (diff) | |
download | onionshare-71558afb57d1f3aa9ac747897dda636f371c6d01.tar.gz onionshare-71558afb57d1f3aa9ac747897dda636f371c6d01.zip |
When canceling a server that has not started, forcefully kill the OnionThread instead of asking it to quit to ensure that it actually stops
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/src/onionshare/tab/mode/__init__.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/desktop/src/onionshare/tab/mode/__init__.py b/desktop/src/onionshare/tab/mode/__init__.py index 7b325704..7d2159c7 100644 --- a/desktop/src/onionshare/tab/mode/__init__.py +++ b/desktop/src/onionshare/tab/mode/__init__.py @@ -350,10 +350,12 @@ class Mode(QtWidgets.QWidget): self.startup_thread.quit() if self.onion_thread: self.common.log("Mode", "cancel_server: quitting onion thread") - self.onion_thread.quit() + self.onion_thread.terminate() + self.onion_thread.wait() if self.web_thread: self.common.log("Mode", "cancel_server: quitting web thread") - self.web_thread.quit() + self.web_thread.terminate() + self.web_thread.wait() self.stop_server() def cancel_server_custom(self): |