summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2015-07-20 15:05:46 -0400
committerKali Kaneko <kali@leap.se>2015-07-20 19:15:21 -0400
commitbc6c85b14452684c19a215ba7974924e7f1fd3af (patch)
tree257fcb385957c00cc82e9c8ce1062c1218ded00b /src
parent0d9c53c4ec182c6bf3452506351258b61bb1f739 (diff)
[bug] start the events server when reactor is running
otherwise, events are not correctly registered - Resolves: #7149
Diffstat (limited to 'src')
-rw-r--r--src/leap/bitmask/backend_app.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/leap/bitmask/backend_app.py b/src/leap/bitmask/backend_app.py
index 011f59fb..1040fbf8 100644
--- a/src/leap/bitmask/backend_app.py
+++ b/src/leap/bitmask/backend_app.py
@@ -86,7 +86,12 @@ def run_backend(bypass_checks=False, flags_dict=None, frontend_pid=None):
# start the events server
# This is not needed for the standalone bundle since the launcher takes
# care of it.
- event_server.ensure_server()
+ try:
+ from twisted.internet import reactor
+ reactor.callWhenRunning(reactor.callLater, 0,
+ event_server.ensure_server)
+ except Exception as e:
+ logger.error("Could not ensure server: %r" % (e,))
backend = LeapBackend(bypass_checks=bypass_checks,
frontend_pid=frontend_pid)