Return list of addresses for IPV4 and IPV6
Closes-Bug: 1657485 Change-Id: Ifd0c338442b97b2ad9476e2856af120d7080f025
This commit is contained in:
parent
8424dbc7cb
commit
58f20a8812
@ -93,8 +93,8 @@ class _SocketConnection(object):
|
|||||||
|
|
||||||
def connect(self, host):
|
def connect(self, host):
|
||||||
"""Connect to host and start the AMQP protocol."""
|
"""Connect to host and start the AMQP protocol."""
|
||||||
addr = socket.getaddrinfo(host.hostname, host.port,
|
addr = socket.getaddrinfo(host.hostname, host.port, socket.AF_UNSPEC,
|
||||||
socket.AF_INET, socket.SOCK_STREAM)
|
socket.SOCK_STREAM)
|
||||||
if not addr:
|
if not addr:
|
||||||
key = "%s:%i" % (host.hostname, host.port)
|
key = "%s:%i" % (host.hostname, host.port)
|
||||||
error = "Invalid peer address '%s'" % key
|
error = "Invalid peer address '%s'" % key
|
||||||
|
Loading…
x
Reference in New Issue
Block a user