From 203865e6600712029ff1554ceb1e286a2aadfaee Mon Sep 17 00:00:00 2001 From: Patrick McManus Date: Thu, 20 Dec 2012 15:51:11 -0500 Subject: [PATCH] bug 807441 increase stickiness of dns choices r=josh --- netwerk/dns/nsHostResolver.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/netwerk/dns/nsHostResolver.cpp b/netwerk/dns/nsHostResolver.cpp index 2ab5875610e..f2e02d10474 100644 --- a/netwerk/dns/nsHostResolver.cpp +++ b/netwerk/dns/nsHostResolver.cpp @@ -535,10 +535,11 @@ nsHostResolver::ResolveHost(const char *host, result = he->rec; Telemetry::Accumulate(Telemetry::DNS_LOOKUP_METHOD2, METHOD_HIT); - // For entries that are in the grace period, or all cached - // negative entries, use the cache but start a new lookup in + // For entries that are in the grace period with a failed connect, + // or all cached negative entries, use the cache but start a new lookup in // the background - if (((NowInMinutes() > he->rec->expiration) || + if ((((NowInMinutes() > he->rec->expiration) && + he->rec->mBlacklistedItems.Length()) || he->rec->negative) && !he->rec->resolving) { LOG(("Using %s cache entry for host [%s] but starting async renewal.", he->rec->negative ? "negative" :"positive", host));