From 5fcf08a4156849fdba5eaba103f59f37082735c6 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Fri, 14 Nov 2014 01:13:52 +0100 Subject: Lower the timeout for each DNS resolution attempt --- slixmpp/xmlstream/resolver.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3