fix logic
This commit is contained in:
parent
68ac516bce
commit
974b893229
1 changed files with 2 additions and 1 deletions
|
@ -1510,7 +1510,8 @@ class Connection:
|
||||||
hosts = []
|
hosts = []
|
||||||
# SRV resolver
|
# SRV resolver
|
||||||
if use_srv and (HAS_DNSPYTHON or HAS_PYDNS):
|
if use_srv and (HAS_DNSPYTHON or HAS_PYDNS):
|
||||||
query = '_xmpp-client._tcp.' + h.decode('utf-8')
|
# query should not be Unicode instance or dnspython TBs!
|
||||||
|
query = '_xmpp-client._tcp.' + h.encode('utf-8')
|
||||||
try:
|
try:
|
||||||
if HAS_DNSPYTHON:
|
if HAS_DNSPYTHON:
|
||||||
answers = [x for x in dns.resolver.query(query, 'SRV')]
|
answers = [x for x in dns.resolver.query(query, 'SRV')]
|
||||||
|
|
Loading…
Add table
Reference in a new issue