Bug 1494364 - don't prune proxy if all non-direct proxies are disabled r=bagder

Differential Revision: https://phabricator.services.mozilla.com/D10625

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Junior Hsu 2018-11-05 07:12:54 +00:00
parent 7280001dbe
commit 557d0841fb

View File

@ -2490,21 +2490,21 @@ nsProtocolProxyService::PruneProxyInfo(const nsProtocolInfo &info,
}
}
// Now, scan to see if all remaining proxies are disabled. If so, then
// Scan to see if all remaining non-direct proxies are disabled. If so, then
// we'll just bail and return them all. Otherwise, we'll go and prune the
// disabled ones.
bool allDisabled = true;
bool allNonDirectProxiesDisabled = true;
nsProxyInfo *iter;
for (iter = head; iter; iter = iter->mNext) {
if (!IsProxyDisabled(iter)) {
allDisabled = false;
if (!IsProxyDisabled(iter) && iter->mType != kProxyType_DIRECT) {
allNonDirectProxiesDisabled = false;
break;
}
}
if (allDisabled) {
if (allNonDirectProxiesDisabled) {
LOG(("All proxies are disabled, so trying all again"));
} else {
// remove any disabled proxies.