diff options
author | Micah Lee <micah@micahflee.com> | 2020-11-27 14:50:07 -0800 |
---|---|---|
committer | Micah Lee <micah@micahflee.com> | 2020-11-27 14:50:07 -0800 |
commit | 134611a3253cc61904c10a61d3434c7bed2d2975 (patch) | |
tree | 4f8cd057af197484f21abe6a3e109a65a30c6dfc /desktop/src/onionshare/threads.py | |
parent | 184f1261896855fcfadf09d36ade36dd9c275d57 (diff) | |
download | onionshare-134611a3253cc61904c10a61d3434c7bed2d2975.tar.gz onionshare-134611a3253cc61904c10a61d3434c7bed2d2975.zip |
Show a dialog while waiting for Tor rendezvous nodes to close, and let the user quit early
Diffstat (limited to 'desktop/src/onionshare/threads.py')
-rw-r--r-- | desktop/src/onionshare/threads.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/desktop/src/onionshare/threads.py b/desktop/src/onionshare/threads.py index d5e2dc6c..22e264e5 100644 --- a/desktop/src/onionshare/threads.py +++ b/desktop/src/onionshare/threads.py @@ -252,3 +252,18 @@ class EventHandlerThread(QtCore.QThread): if self.should_quit: break time.sleep(0.2) + + +class OnionCleanupThread(QtCore.QThread): + """ + Wait for Tor rendezvous circuits to close in a separate thread + """ + + def __init__(self, common): + super(OnionCleanupThread, self).__init__() + self.common = common + self.common.log("OnionCleanupThread", "__init__") + + def run(self): + self.common.log("OnionCleanupThread", "run") + self.common.gui.onion.cleanup() |