summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/backend_app.py
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2015-05-29 19:02:44 -0300
committerdrebs <drebs@leap.se>2015-05-29 19:05:02 -0300
commit907a864c774cc43fcf0ebff3d6b5082901661e98 (patch)
tree8f54fa030bb85aefaa877736d114d8d26739a8da /src/leap/bitmask/backend_app.py
parent5a0de9fd25d783039345674680c67a2bd91815a5 (diff)
[bug] move events server init to backend
If the events server is initialized in a different process than the backend, the txzmq socket raises an "zmq.error.ZMQError: Interrupted system call" exception during the events server initialization. Despite that, communication seems to work flawlessly after the initialization. Moving the events server initialization to the same process as the backend causes the exception to not be raised during events server intialization.
Diffstat (limited to 'src/leap/bitmask/backend_app.py')
-rw-r--r--src/leap/bitmask/backend_app.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/leap/bitmask/backend_app.py b/src/leap/bitmask/backend_app.py
index 3e88a95a..5fc8d1e2 100644
--- a/src/leap/bitmask/backend_app.py
+++ b/src/leap/bitmask/backend_app.py
@@ -21,6 +21,8 @@ import logging
import multiprocessing
import signal
+from leap.common.events import server as event_server
+
from leap.bitmask.backend.leapbackend import LeapBackend
from leap.bitmask.backend.utils import generate_zmq_certificates
from leap.bitmask.config import flags
@@ -68,6 +70,9 @@ def run_backend(bypass_checks=False, flags_dict=None, frontend_pid=None):
if flags_dict is not None:
dict_to_flags(flags_dict)
+ # start the events server
+ event_server.ensure_server()
+
backend = LeapBackend(bypass_checks=bypass_checks,
frontend_pid=frontend_pid)
backend.run()