mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 14:23:30 +01:00
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:
parent
5ffabd4de4
commit
4e9a008e66
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user