From bc6c85b14452684c19a215ba7974924e7f1fd3af Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Mon, 20 Jul 2015 15:05:46 -0400 Subject: [bug] start the events server when reactor is running otherwise, events are not correctly registered - Resolves: #7149 --- src/leap/bitmask/backend_app.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3