summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/backend_app.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/bitmask/backend_app.py')
-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)