Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Jajcus/pyxmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/pyxmpp
diff options
context:
space:
mode:
authorJacek Konieczny <jajcus@jajcus.net>2011-05-04 19:43:04 +0400
committerJacek Konieczny <jajcus@jajcus.net>2011-05-04 19:43:04 +0400
commit4570e465fc4cc2e485bc9d4e9011617e7150dc2b (patch)
tree8320bf55b06ff47f582af32ac2c75677cfa9eb98 /pyxmpp
parentcb8dd559dc3bed05a7fef825ce873e0145b2ea5e (diff)
SRV handling fix
PyXMPP would twice connect to the same host if two SRV records with different priorities are available. This change fixes this behaviour and thus the SRV fall-back mechanism
Diffstat (limited to 'pyxmpp')
-rw-r--r--pyxmpp/resolver.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pyxmpp/resolver.py b/pyxmpp/resolver.py
index a4aa1c7..2ece82c 100644
--- a/pyxmpp/resolver.py
+++ b/pyxmpp/resolver.py
@@ -104,11 +104,12 @@ def reorder_srv(records):
tmp.append(rr)
continue
ret+=shuffle_srv(tmp)
+ tmp = [rr]
if tmp:
ret+=shuffle_srv(tmp)
return ret
-def resolve_srv(domain,service, proto="tcp"):
+def resolve_srv(domain, service, proto="tcp"):
"""Resolve service domain to server name and port number using SRV records.
A built-in service alias table will be used to lookup also some obsolete