aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerlist.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2006-05-30 06:19:06 +0000
committerRoger Dingledine <arma@torproject.org>2006-05-30 06:19:06 +0000
commitae2648fb1c1eed93a9cc2c7480c22516f1f33d56 (patch)
treeb400a035d775b179eba547fbaea9522cc9efb2e3 /src/or/routerlist.c
parent1f0e20806b442153d439060b278a1da1b36d2216 (diff)
downloadtor-ae2648fb1c1eed93a9cc2c7480c22516f1f33d56.tar
tor-ae2648fb1c1eed93a9cc2c7480c22516f1f33d56.tar.gz
stop fetching descriptors if we're not a dir mirror and we
haven't tried to establish any circuits lately. svn:r6516
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r--src/or/routerlist.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 966ccb970..6d56555e4 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -3435,6 +3435,12 @@ update_router_descriptor_client_downloads(time_t now)
"Called router_descriptor_client_downloads() on a dir mirror?");
}
+ if (rep_hist_circbuilding_dormant()) {
+ log_info(LD_CIRC, "Skipping descriptor downloads: we haven't need "
+ "any circuits lately.");
+ return;
+ }
+
/* XXX here's another magic 2 that probably should be replaced
* by <= smartlist_len(trusted_dir_servers)/2
* or by a function returning same. -- weasel */