summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp')
-rw-r--r--sleekxmpp/xmlstream/resolver.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/sleekxmpp/xmlstream/resolver.py b/sleekxmpp/xmlstream/resolver.py
index ecb76519..db97f5fb 100644
--- a/sleekxmpp/xmlstream/resolver.py
+++ b/sleekxmpp/xmlstream/resolver.py
@@ -115,6 +115,9 @@ def resolve(host, port=None, service=None, proto='tcp', resolver=None):
for host, port in hosts:
results = []
+ if host == 'localhost':
+ results.append(('::1', port))
+ results.append(('127.0.0.1', port))
for address in get_AAAA(host, resolver=resolver):
results.append((address, port))
for address in get_A(host, resolver=resolver):