summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--slixmpp/xmlstream/xmlstream.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/slixmpp/xmlstream/xmlstream.py b/slixmpp/xmlstream/xmlstream.py
index 8daf99e4..db494ee2 100644
--- a/slixmpp/xmlstream/xmlstream.py
+++ b/slixmpp/xmlstream/xmlstream.py
@@ -289,7 +289,8 @@ class XMLStream(asyncio.BaseProtocol):
record = yield from self.pick_dns_answer(self.default_domain)
if record is not None:
- host, address, port = record
+ host, address, dns_port = record
+ port = dns_port if dns_port else self.address[1]
self.address = (address, port)
self._service_name = host
else: