diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-05-03 17:28:28 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-05-03 17:28:28 -0400 |
commit | 68ae5afa5a172fbc485eda7e6bfd4750fa6a69f5 (patch) | |
tree | c97962c1ad80afc0febff088fbdf020e331738c3 /src/or/main.c | |
parent | cb6c909664f97f751fe78c0aa3205a9042760c53 (diff) | |
download | tor-68ae5afa5a172fbc485eda7e6bfd4750fa6a69f5.tar.gz tor-68ae5afa5a172fbc485eda7e6bfd4750fa6a69f5.zip |
Change who calls microdesc_cache_rebuild().
Previously we ensured that it would get called periodically by doing
it from inside the code that added microdescriptors. That won't work
though: it would interfere with our code that tried to read microdescs
from disk initially. Instead, we should consider rebuilding the cache
periodically, and on startup.
Diffstat (limited to 'src/or/main.c')
-rw-r--r-- | src/or/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c index a26be39fdf..462b51e783 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -1075,6 +1075,8 @@ run_scheduled_events(time_t now) rep_history_clean(now - options->RephistTrackTime); rend_cache_clean(); rend_cache_clean_v2_descs_as_dir(); + if (authdir_mode_v3(options)) + microdesc_cache_rebuild(NULL, 0); #define CLEAN_CACHES_INTERVAL (30*60) time_to_clean_caches = now + CLEAN_CACHES_INTERVAL; } |