Narrow down connection exception to socket.error

This commit is contained in:
Ivan Babrou 2017-02-15 12:34:04 -08:00
parent e8a2cc0488
commit 0df6b922e7
No known key found for this signature in database
GPG Key ID: DBF6C142408CB4F0

View File

@ -754,7 +754,7 @@ def dns_check(addr, port, connect=True, safe=False, ipv6=None):
resolved = candidate_addr
break
except Exception:
except socket.error:
pass
if not resolved:
error = True