summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2014-06-25 12:35:04 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2014-07-14 12:14:19 -0300
commit5b34d32682188f4849a1e2a4aa8cf8b4c900b8d8 (patch)
tree7cd11713d85360e931fa72f192f1c43996af802d /src/leap
parent6dbd52e2f0d75ad9bf7c2f11e3384d8bab0520c9 (diff)
Properly stop backend.
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/bitmask/gui/mainwindow.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py
index 4b5d1c83..9b6dc8bd 100644
--- a/src/leap/bitmask/gui/mainwindow.py
+++ b/src/leap/bitmask/gui/mainwindow.py
@@ -18,6 +18,7 @@
Main window for Bitmask.
"""
import logging
+import time
from datetime import datetime
@@ -1788,7 +1789,6 @@ class MainWindow(QtGui.QMainWindow):
Final steps to quit the app, starting from here we don't care about
running services or user interaction, just quitting.
"""
-
# We can reach here because all the services are stopped or because a
# timeout was triggered. Since we want to run this only once, we exit
# if this is called twice.
@@ -1801,6 +1801,10 @@ class MainWindow(QtGui.QMainWindow):
self._backend.soledad_close()
logger.debug('Final quit...')
+ self._leap_signaler.stop()
+ self._backend.stop()
+ time.sleep(0.05) # give the thread a little time to finish.
+
# Remove lockfiles on a clean shutdown.
logger.debug('Cleaning pidfiles')
if IS_WIN: