diff options
author | Micah Lee <micah@micahflee.com> | 2020-11-09 20:09:56 -0800 |
---|---|---|
committer | Micah Lee <micah@micahflee.com> | 2020-11-09 20:09:56 -0800 |
commit | 09d1118a945620487e67ea70ddff9b145399d4ff (patch) | |
tree | b437723288ad69f0f8fbcbe4cde9de74913c7a15 /desktop/src/onionshare/main_window.py | |
parent | f67e7ce67885dea4a8ed308fbffd84108a08ec22 (diff) | |
download | onionshare-09d1118a945620487e67ea70ddff9b145399d4ff.tar.gz onionshare-09d1118a945620487e67ea70ddff9b145399d4ff.zip |
Only close web thread on cleanup if web thread exists, and sleep 1 second when cleaning up MainWindow so loose threads can finish
Diffstat (limited to 'desktop/src/onionshare/main_window.py')
-rw-r--r-- | desktop/src/onionshare/main_window.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/desktop/src/onionshare/main_window.py b/desktop/src/onionshare/main_window.py index 38a6b275..c1e0cd1a 100644 --- a/desktop/src/onionshare/main_window.py +++ b/desktop/src/onionshare/main_window.py @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ +import time from PySide2 import QtCore, QtWidgets, QtGui from onionshare_cli.web import Web @@ -286,3 +287,6 @@ class MainWindow(QtWidgets.QMainWindow): def cleanup(self): self.tabs.cleanup() self.common.gui.onion.cleanup() + + # Wait 1 second for threads to close gracefully, so tests finally pass + time.sleep(1) |