diff --git a/slixmpp/xmlstream/xmlstream.py b/slixmpp/xmlstream/xmlstream.py index 98b0744c..d39a0f4b 100644 --- a/slixmpp/xmlstream/xmlstream.py +++ b/slixmpp/xmlstream/xmlstream.py @@ -302,7 +302,7 @@ async def _connect_routine(self): record = await self.pick_dns_answer(self.default_domain) if record is not None: host, address, dns_port = record - port = dns_port if dns_port else self.address[1] + port = self.address[1] if self.address[1] else dns_port self.address = (address, port) self._service_name = host else: