summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
cd1f331)
Resolver queries are indexed by query domain name. Previously, if we
find another place which wants the same name resolved, we'd overwrite
the existing query with the new one, which causes the old one to be
cancelled (despite it possibly having made progress).
(This also avoids tickling a bug in mLib's handling of aborted queries,
fixed separately.)
def prepare(me, host):
"""Prime the resolver to resolve the name HOST."""
def prepare(me, host):
"""Prime the resolver to resolve the name HOST."""
- me._resolvers[host] = M.SelResolveByName \
- (host,
- lambda name, alias, addr:
- me._resolved(host, addr[0]),
- lambda: me._resolved(host, None))
+ if host not in me._resolvers:
+ me._resolvers[host] = M.SelResolveByName \
+ (host,
+ lambda name, alias, addr:
+ me._resolved(host, addr[0]),
+ lambda: me._resolved(host, None))
def run(me):
"""Run the background DNS resolver until it's finished."""
def run(me):
"""Run the background DNS resolver until it's finished."""