Always delete entries from _pending when promise is resolved
In the queryAndCache function, _pending entries are deleted at return but not in fallback mode. So in fallback mode, _dnsLookup is called only once. Thus, name resolution remains in an old state.
Always delete entries from _pending when promise is resolved
In the
queryAndCache
function,_pending
entries are deleted at return but not in fallback mode. So in fallback mode, _dnsLookup is called only once. Thus, name resolution remains in an old state.Add a test for demonstration.