diff options
author | drebs <drebs@leap.se> | 2015-06-26 14:44:37 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2015-06-26 14:44:37 -0300 |
commit | c6107b88ba1eaf7e7ca97d0444e7444634aa98c2 (patch) | |
tree | c79e4603483f9ae1776322e369bc211685cfaaf7 /src | |
parent | ba2d0922f056736b2c851a1f95afcc28a7023524 (diff) |
[bug] allow passing ':0' as port in events address
Diffstat (limited to 'src')
-rw-r--r-- | src/leap/common/events/zmq_components.py | 4 |
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: |