summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2007-05-10 09:34:34 +0000
committerRoger Dingledine <arma@torproject.org>2007-05-10 09:34:34 +0000
commit4e9a008e66567d5901625441c597fe38c3489b45 (patch)
treee33b2d05d820a37d942e8d76431126763ae07360
parent5ffabd4de4ee61fc0027b3fb82f7db22d96e661d (diff)
downloadtor-4e9a008e66567d5901625441c597fe38c3489b45.tar.gz
tor-4e9a008e66567d5901625441c597fe38c3489b45.zip
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
-rw-r--r--src/or/routerlist.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 02c04a81ff..c1e55ea481 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -3188,8 +3188,12 @@ update_networkstatus_client_downloads(time_t now)
ds = smartlist_get(trusted_dir_servers, i);
if (!(ds->type & V2_AUTHORITY))
continue;
- if (n_failed < n_dirservers &&
- ds->n_networkstatus_failures > NETWORKSTATUS_N_ALLOWABLE_FAILURES) {
+ if (n_failed >= n_dirservers) {
+ 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;
continue;
}