Return list of addresses for IPV4 and IPV6

Closes-Bug: 1657485
Change-Id: Ifd0c338442b97b2ad9476e2856af120d7080f025
This commit is contained in:
Andrew Smith 2017-01-18 12:09:24 -05:00
parent 8424dbc7cb
commit 58f20a8812
1 changed files with 2 additions and 2 deletions

View File

@ -93,8 +93,8 @@ class _SocketConnection(object):
def connect(self, host):
"""Connect to host and start the AMQP protocol."""
addr = socket.getaddrinfo(host.hostname, host.port,
socket.AF_INET, socket.SOCK_STREAM)
addr = socket.getaddrinfo(host.hostname, host.port, socket.AF_UNSPEC,
socket.SOCK_STREAM)
if not addr:
key = "%s:%i" % (host.hostname, host.port)
error = "Invalid peer address '%s'" % key