aboutsummaryrefslogtreecommitdiff
path: root/desktop/src/onionshare/threads.py
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2020-11-27 14:50:07 -0800
committerMicah Lee <micah@micahflee.com>2020-11-27 14:50:07 -0800
commit134611a3253cc61904c10a61d3434c7bed2d2975 (patch)
tree4f8cd057af197484f21abe6a3e109a65a30c6dfc /desktop/src/onionshare/threads.py
parent184f1261896855fcfadf09d36ade36dd9c275d57 (diff)
downloadonionshare-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.py15
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()