From c6107b88ba1eaf7e7ca97d0444e7444634aa98c2 Mon Sep 17 00:00:00 2001 From: drebs Date: Fri, 26 Jun 2015 14:44:37 -0300 Subject: [bug] allow passing ':0' as port in events address --- src/leap/common/events/zmq_components.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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: -- cgit v1.2.3