summaryrefslogtreecommitdiff
path: root/src/leap/common/events
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2015-10-29 12:00:39 -0400
committerKali Kaneko <kali@leap.se>2015-10-29 12:00:39 -0400
commitee0e9cadccd00cb62032d8fc4b322bb6fe3dc7ed (patch)
treeaae58b3f251c5a621d75b8d77428bbd90699e560 /src/leap/common/events
parent3ab6b2aff4a38a4fabd4320880ef795f05ccd17f (diff)
parent3fabc788c27b2c2619d8e23b3eebc018b95faf7a (diff)
Merge tag '0.4.4' into debian/experimental
Tag leap.common version 0.4.4
Diffstat (limited to 'src/leap/common/events')
-rw-r--r--src/leap/common/events/client.py5
-rw-r--r--src/leap/common/events/txclient.py2
-rw-r--r--src/leap/common/events/zmq_components.py10
3 files changed, 11 insertions, 6 deletions
diff --git a/src/leap/common/events/client.py b/src/leap/common/events/client.py
index e38e9d3..60d24bc 100644
--- a/src/leap/common/events/client.py
+++ b/src/leap/common/events/client.py
@@ -47,7 +47,7 @@ try:
except ImportError:
pass
-from leap.common.config import get_path_prefix
+from leap.common.config import flags, get_path_prefix
from leap.common.zmq_utils import zmq_has_curve
from leap.common.zmq_utils import maybe_create_and_get_certificates
from leap.common.zmq_utils import PUBLIC_KEYS_PREFIX
@@ -55,7 +55,6 @@ from leap.common.zmq_utils import PUBLIC_KEYS_PREFIX
from leap.common.events.errors import CallbackAlreadyRegisteredError
from leap.common.events.server import EMIT_ADDR
from leap.common.events.server import REG_ADDR
-from leap.common.events import flags
from leap.common.events import catalog
@@ -280,7 +279,7 @@ class EventsClientThread(threading.Thread, EventsClient):
self._lock = threading.Lock()
self._initialized = threading.Event()
self._config_prefix = os.path.join(
- get_path_prefix(), "leap", "events")
+ get_path_prefix(flags.STANDALONE), "leap", "events")
self._loop = None
self._context = None
self._push = None
diff --git a/src/leap/common/events/txclient.py b/src/leap/common/events/txclient.py
index f3c183e..dfd0533 100644
--- a/src/leap/common/events/txclient.py
+++ b/src/leap/common/events/txclient.py
@@ -35,7 +35,7 @@ from leap.common.events.client import EventsClient
from leap.common.events.client import configure_client
from leap.common.events.server import EMIT_ADDR
from leap.common.events.server import REG_ADDR
-from leap.common.events import catalog, flags
+from leap.common.events import catalog
logger = logging.getLogger(__name__)
diff --git a/src/leap/common/events/zmq_components.py b/src/leap/common/events/zmq_components.py
index f99c754..51de02c 100644
--- a/src/leap/common/events/zmq_components.py
+++ b/src/leap/common/events/zmq_components.py
@@ -25,6 +25,7 @@ import os
import logging
import txzmq
import re
+import time
from abc import ABCMeta
@@ -36,7 +37,7 @@ try:
except ImportError:
pass
-from leap.common.config import get_path_prefix
+from leap.common.config import flags, get_path_prefix
from leap.common.zmq_utils import zmq_has_curve
from leap.common.zmq_utils import maybe_create_and_get_certificates
from leap.common.zmq_utils import PUBLIC_KEYS_PREFIX
@@ -64,7 +65,7 @@ class TxZmqComponent(object):
self._factory = txzmq.ZmqFactory()
self._factory.registerForShutdown()
if path_prefix is None:
- path_prefix = get_path_prefix()
+ path_prefix = get_path_prefix(flags.STANDALONE)
self._config_prefix = os.path.join(path_prefix, "leap", "events")
self._connections = []
@@ -154,6 +155,11 @@ class TxZmqComponent(object):
:type socket: zmq.Socket
"""
authenticator = ThreadAuthenticator(self._factory.context)
+
+ # Temporary fix until we understand what the problem is
+ # See https://leap.se/code/issues/7536
+ time.sleep(0.5)
+
authenticator.start()
# XXX do not hardcode this here.
authenticator.allow('127.0.0.1')