Enable IPv6-support in libzmq by default

Change-Id: I53790e5492ebf026e0b331ecb3c294da89603540
Closes-Bug: 1389137
This commit is contained in:
Frode Nordahl 2014-12-08 09:53:41 +01:00
parent f4bb707bc3
commit c40ba040a6
1 changed files with 6 additions and 0 deletions

View File

@ -120,6 +120,12 @@ class ZmqSocket(object):
def __init__(self, addr, zmq_type, bind=True, subscribe=None):
self.ctxt = zmq.Context(CONF.rpc_zmq_contexts)
self.sock = self.ctxt.socket(zmq_type)
# Enable IPv6-support in libzmq.
# When IPv6 is enabled, a socket will connect to, or accept
# connections from, both IPv4 and IPv6 hosts.
self.sock.ipv6 = True
self.addr = addr
self.type = zmq_type
self.subscriptions = []