diff options
author | Florent Le Coz <louiz@louiz.org> | 2014-11-14 01:13:52 +0100 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2014-11-14 01:13:52 +0100 |
commit | 5fcf08a4156849fdba5eaba103f59f37082735c6 (patch) | |
tree | af2c21ff103a4e35b879a9b84a5091a8ce13f652 | |
parent | 3c06568ed57f2e41ca97693330d71b173f9b0c98 (diff) | |
download | slixmpp-5fcf08a4156849fdba5eaba103f59f37082735c6.tar.gz slixmpp-5fcf08a4156849fdba5eaba103f59f37082735c6.tar.bz2 slixmpp-5fcf08a4156849fdba5eaba103f59f37082735c6.tar.xz slixmpp-5fcf08a4156849fdba5eaba103f59f37082735c6.zip |
Lower the timeout for each DNS resolution attempt
-rw-r--r-- | slixmpp/xmlstream/resolver.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/slixmpp/xmlstream/resolver.py b/slixmpp/xmlstream/resolver.py index ab1424aa..a3697d14 100644 --- a/slixmpp/xmlstream/resolver.py +++ b/slixmpp/xmlstream/resolver.py @@ -39,7 +39,9 @@ def default_resolver(): is available. Otherwise, ``None``. """ if AIODNS_AVAILABLE: - return aiodns.DNSResolver(loop=asyncio.get_event_loop()) + return aiodns.DNSResolver(loop=asyncio.get_event_loop(), + tries=1, + timeout=1.0) return None |