summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-01-20 04:23:00 +0800
committerLance Stout <lancestout@gmail.com>2011-01-20 06:34:08 +0800
commit897a9ac3335ef42e454aba44346d8702564ab48f (patch)
tree77b6fdc7e1dae16161ff092dbe7af2becb8d1ff3 /sleekxmpp
parentacc2d071ac5da8e822bd3c63dda640a81e93deec (diff)
downloadslixmpp-897a9ac3335ef42e454aba44346d8702564ab48f.tar.gz
slixmpp-897a9ac3335ef42e454aba44346d8702564ab48f.tar.bz2
slixmpp-897a9ac3335ef42e454aba44346d8702564ab48f.tar.xz
slixmpp-897a9ac3335ef42e454aba44346d8702564ab48f.zip
Do not traceback when DNS resolution time out.
Just log that the resolution timed out, and fall back to the hostname from the JID in this case
Diffstat (limited to 'sleekxmpp')
-rw-r--r--sleekxmpp/clientxmpp.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/sleekxmpp/clientxmpp.py b/sleekxmpp/clientxmpp.py
index 734c9a14..b8668107 100644
--- a/sleekxmpp/clientxmpp.py
+++ b/sleekxmpp/clientxmpp.py
@@ -169,6 +169,8 @@ class ClientXMPP(BaseXMPP):
except (dns.resolver.NXDOMAIN, dns.resolver.NoAnswer):
log.debug("No appropriate SRV record found." + \
" Using JID server name.")
+ except (dns.exception.Timeout,):
+ log.debug("DNS resolution timed out.")
else:
# Pick a random server, weighted by priority.