mirror of
https://github.com/correl/SleekXMPP.git
synced 2025-03-07 04:45:11 -10:00
fixed SRV query - should use dns.rdatatype.SRV
This commit is contained in:
parent
e8d0fc37dc
commit
de4d611d30
1 changed files with 3 additions and 1 deletions
|
@ -31,6 +31,7 @@ from . import plugins
|
|||
srvsupport = True
|
||||
try:
|
||||
import dns.resolver
|
||||
import dns.rdatatype
|
||||
except ImportError:
|
||||
srvsupport = False
|
||||
|
||||
|
@ -96,7 +97,8 @@ class ClientXMPP(basexmpp, XMLStream):
|
|||
else:
|
||||
logging.debug("Since no address is supplied, attempting SRV lookup.")
|
||||
try:
|
||||
answers = dns.resolver.query("_xmpp-client._tcp.%s" % self.server)
|
||||
answers = dns.resolver.query("_xmpp-client._tcp.%s" % self.domain,
|
||||
dns.rdatatype.SRV )
|
||||
except dns.resolver.NXDOMAIN:
|
||||
logging.debug("No appropriate SRV record found. Using JID server name.")
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue