only end querying when response is of query type AAAA
This commit is contained in:
parent
3ce7c18dfb
commit
e72594ffbe
1 changed files with 4 additions and 1 deletions
|
@ -363,7 +363,10 @@ class DNSResolver(object):
|
||||||
self._cache[hostname] = ip
|
self._cache[hostname] = ip
|
||||||
self._call_callback(hostname, ip)
|
self._call_callback(hostname, ip)
|
||||||
elif self._hostname_status.get(hostname, None) == STATUS_IPV6:
|
elif self._hostname_status.get(hostname, None) == STATUS_IPV6:
|
||||||
self._call_callback(hostname, None)
|
for question in response.questions:
|
||||||
|
if question[1] == QTYPE_AAAA:
|
||||||
|
self._call_callback(hostname, None)
|
||||||
|
break
|
||||||
|
|
||||||
def handle_events(self, events):
|
def handle_events(self, events):
|
||||||
for sock, fd, event in events:
|
for sock, fd, event in events:
|
||||||
|
|
Loading…
Reference in a new issue