summaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2007-11-26 02:18:57 +0000
committerRoger Dingledine <arma@torproject.org>2007-11-26 02:18:57 +0000
commit91bb09cb28246f8ae2fe7525be61eba58f6bf814 (patch)
tree79b4b9bd822ec4b13565e6c765d70049ca6b4761 /src/or/main.c
parent17393b835927cec5db32dce7af8f2f4721e9a71b (diff)
downloadtor-91bb09cb28246f8ae2fe7525be61eba58f6bf814.tar.gz
tor-91bb09cb28246f8ae2fe7525be61eba58f6bf814.zip
Only update guard status (usable / not usable) once we have
enough directory information. This was causing us to always pick two new guards on startup (bugfix on 0.2.0.9-alpha), and it was causing us to discard all our guards on startup if we hadn't been running for a few weeks (bugfix on 0.1.2.x). Fixes bug 448. svn:r12570
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 775c5f656f..9d88b76217 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -663,6 +663,9 @@ directory_info_has_arrived(time_t now, int from_cache)
update_router_descriptor_downloads(now);
return;
} else {
+ /* if we have enough dir info, then update our guard status with
+ * whatever we just learned. */
+ entry_guards_compute_status();
/* Don't even bother trying to get extrainfo until the rest of our
* directory info is up-to-date */
if (options->DownloadExtraInfo)