diff options
author | Roger Dingledine <arma@torproject.org> | 2007-05-12 23:22:27 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2007-05-12 23:22:27 +0000 |
commit | 346826d97b659eb283dd6f62611634de3dd6fc08 (patch) | |
tree | 41735ab6e32e226625240a0ba0d6fb7c5f27bb1c /src | |
parent | bfedb4e8120e0525247d4b90f1873f1d58e4a96b (diff) | |
download | tor-346826d97b659eb283dd6f62611634de3dd6fc08.tar.gz tor-346826d97b659eb283dd6f62611634de3dd6fc08.zip |
If a directory authority is down, skip it when deciding where to get
networkstatus objects or descriptors. Otherwise we keep asking
every 10 seconds forever.
(adapted from r9880)
svn:r10175
Diffstat (limited to 'src')
-rw-r--r-- | src/or/routerlist.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 716fe7e360..12161779d9 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -4317,6 +4317,7 @@ update_router_descriptor_cache_downloads(time_t now) n_download = 0; SMARTLIST_FOREACH(networkstatus_list, networkstatus_t *, ns, { + trusted_dir_server_t *ds; smartlist_t *dl; dl = downloadable[ns_sl_idx] = smartlist_create(); download_from[ns_sl_idx] = smartlist_create(); @@ -4330,13 +4331,13 @@ update_router_descriptor_cache_downloads(time_t now) * we take this clause out. -RD */ continue; } - { /* XXX temporary hack so I can debug other stuff without bug 384 - * filling up my logs. */ - trusted_dir_server_t *ds; - ds = router_get_trusteddirserver_by_digest(ns->identity_digest); - if (ds && !ds->is_running) - continue; - } + + /* Don't try dirservers that we think are down -- we might have + * just tried them and just marked them as down. */ + ds = router_get_trusteddirserver_by_digest(ns->identity_digest); + if (ds && !ds->is_running) + continue; + SMARTLIST_FOREACH(ns->entries, routerstatus_t * , rs, { if (!rs->need_to_mirror) |