diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-08-13 09:41:43 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-08-13 09:45:30 -0400 |
commit | e62518865b312816211086c6a0d080e7258dae5b (patch) | |
tree | 9af124680dd0fe461dc2412aec9473ab653e7ac3 /src/or/main.c | |
parent | 6b2696296640585bb6247ff6c88570c38b4b25a8 (diff) | |
download | tor-e62518865b312816211086c6a0d080e7258dae5b.tar.gz tor-e62518865b312816211086c6a0d080e7258dae5b.zip |
Decouple routerlist_retry_directory_downloads() from the blob
Instead of having it call update_all_descriptor_downloads and
update_networkstatus_downloads directly, we can have it cause them to
get rescheduled and called from run_scheduled_events.
Closes ticket 16789.
Diffstat (limited to 'src/or/main.c')
-rw-r--r-- | src/or/main.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c index a29387c67a..2e50c5b090 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -1280,6 +1280,17 @@ reschedule_descriptor_update_check(void) time_to.check_descriptor = 0; } +/** + * Update our schedule so that we'll check whether we need to fetch directory + * info immediately. + */ +void +reschedule_directory_downloads(void) +{ + time_to.download_networkstatus = 0; + time_to.try_getting_descriptors = 0; +} + /** Perform regular maintenance tasks. This function gets run once per * second by second_elapsed_callback(). */ |