summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/gui/mainwindow.py
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2015-07-06 19:01:08 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2015-07-06 19:05:32 -0300
commit2612f7af2aa627ba4c4d680d15f54ede6402b4eb (patch)
treefc36418a6cdcff15db8c212d9cfe2925bed9f7e5 /src/leap/bitmask/gui/mainwindow.py
parent0e6bd92806d9e55bbd686c9df6d9d919c25780c3 (diff)
[bug] run zmq log subscriber in background
Prevent locks caused by the zmq log handler reaching the zmq's HWM (High water mark / buffer limit) and causing some components to block until the buffer is empty (running the zmq handler for instance). We run the zmq handler in the background all the time to prevent this. - Resolves: #7222
Diffstat (limited to 'src/leap/bitmask/gui/mainwindow.py')
-rw-r--r--src/leap/bitmask/gui/mainwindow.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py
index a2cf7bca..9f6c77cd 100644
--- a/src/leap/bitmask/gui/mainwindow.py
+++ b/src/leap/bitmask/gui/mainwindow.py
@@ -33,7 +33,7 @@ from leap.bitmask import __version_hash__ as VERSION_HASH
from leap.bitmask.backend.leapbackend import ERROR_KEY, PASSED_KEY
from leap.bitmask.config import flags
-from leap.bitmask.logs.utils import get_logger
+from leap.bitmask.logs.utils import get_logger, LOG_CONTROLLER
from leap.bitmask.gui.advanced_key_management import AdvancedKeyManagement
from leap.bitmask.gui.eip_status import EIPStatusWidget
@@ -740,6 +740,8 @@ class MainWindow(QtGui.QMainWindow, SignalTracker):
self._show_hide_unsupported_services()
+ LOG_CONTROLLER.start_logbook_subscriber()
+
# XXX - HACK, kind of...
# With the 1ms QTimer.singleShot call we schedule the call right after
# other signals waiting for the qt reactor to take control.
@@ -1707,6 +1709,7 @@ class MainWindow(QtGui.QMainWindow, SignalTracker):
self._leap_signaler.stop()
+ LOG_CONTROLLER.stop_logbook_subscriber()
self._backend.stop()
time.sleep(0.05) # give the thread a little time to finish.