Fixes port being set to 0 when connecting via hostname.
This seems to be the same issue as: https://dev.louiz.org/issues/3164 Using their suggested fix, if the DNS lookup doesn't return a port, use the one passed in instead.
This commit is contained in:
parent
e4107d8b4d
commit
c33749e57a
@ -289,7 +289,8 @@ class XMLStream(asyncio.BaseProtocol):
|
|||||||
|
|
||||||
record = yield from self.pick_dns_answer(self.default_domain)
|
record = yield from self.pick_dns_answer(self.default_domain)
|
||||||
if record is not None:
|
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.address = (address, port)
|
||||||
self._service_name = host
|
self._service_name = host
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user