summaryrefslogtreecommitdiff
path: root/src/leap/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/common')
-rw-r--r--src/leap/common/events/zmq_components.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/leap/common/events/zmq_components.py b/src/leap/common/events/zmq_components.py
index 3b88862..04f71e0 100644
--- a/src/leap/common/events/zmq_components.py
+++ b/src/leap/common/events/zmq_components.py
@@ -128,9 +128,9 @@ class TxZmqComponent(object):
proto, addr, port = ADDRESS_RE.search(address).groups()
- if port is None:
+ if port is None or port is '0':
params = proto, addr
- port = socket.bind("%s://%s" % params)
+ port = socket.bind_to_random_port("%s://%s" % params)
# XXX this log doesn't appear
logger.debug("Binded %s to %s://%s." % ((connClass,) + params))
else: