diff options
Diffstat (limited to 'sleekxmpp/xmlstream/resolver.py')
-rw-r--r-- | sleekxmpp/xmlstream/resolver.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sleekxmpp/xmlstream/resolver.py b/sleekxmpp/xmlstream/resolver.py index 4cac254c..6f26797f 100644 --- a/sleekxmpp/xmlstream/resolver.py +++ b/sleekxmpp/xmlstream/resolver.py @@ -202,6 +202,9 @@ def get_AAAA(host, resolver=None): # If not using dnspython, attempt lookup using the OS level # getaddrinfo() method. if resolver is None: + if not socket.has_ipv6: + log.debug("Unable to query %s for AAAA records: IPv6 is not supported", host) + return [] try: recs = socket.getaddrinfo(host, None, socket.AF_INET6, socket.SOCK_STREAM) |