Backport candidate: if all of our dirservers have given us

bad or no networkstatuses lately, then stop hammering them
once per minute even if we think they're failed.


svn:r10156
This commit is contained in:
Roger Dingledine 2007-05-10 09:34:34 +00:00
parent 5ffabd4de4
commit 4e9a008e66

View File

@ -3188,8 +3188,12 @@ update_networkstatus_client_downloads(time_t now)
ds = smartlist_get(trusted_dir_servers, i); ds = smartlist_get(trusted_dir_servers, i);
if (!(ds->type & V2_AUTHORITY)) if (!(ds->type & V2_AUTHORITY))
continue; continue;
if (n_failed < n_dirservers && if (n_failed >= n_dirservers) {
ds->n_networkstatus_failures > NETWORKSTATUS_N_ALLOWABLE_FAILURES) { log_info(LD_DIR, "All authorities have failed. Not trying any.");
smartlist_free(missing);
return;
}
if (ds->n_networkstatus_failures > NETWORKSTATUS_N_ALLOWABLE_FAILURES) {
++n_failed; ++n_failed;
continue; continue;
} }