diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-10-05 05:03:52 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-10-05 05:03:52 +0000 |
commit | 370e4abdc976cfd57c09f8e77549cb181371b4fe (patch) | |
tree | 7354ae3b9d6dbb251aebeae1963a866dff7784d0 /src/or/main.c | |
parent | adf04f121e17b4eef14a2e66b8bc960cb66fa828 (diff) | |
download | tor-370e4abdc976cfd57c09f8e77549cb181371b4fe.tar tor-370e4abdc976cfd57c09f8e77549cb181371b4fe.tar.gz |
replace former relaunches of directory downloads with reset of failure count and relaunch of status downloads. Fix memory leak in trusted_dir_server_t. Reset "last download attempted" time when resetting failure counts.
svn:r5195
Diffstat (limited to 'src/or/main.c')
-rw-r--r-- | src/or/main.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/or/main.c b/src/or/main.c index f5b1d3fc2..3171a6921 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -752,10 +752,7 @@ run_scheduled_events(time_t now) /* Also, once per minute, check whether we want to download any * networkstatus documents. */ - if (server_mode(options) && options->DirPort) - update_networkstatus_cache_downloads(now); - else - update_networkstatus_client_downloads(now); + update_networkstatus_downloads(now); } /** 3a. Every second, we examine pending circuits and prune the @@ -946,8 +943,14 @@ do_hup(void) log_fn(LOG_NOTICE, "Error reloading fingerprints. Continuing with old list."); } } - /* XXXX011 NM This should be a generic "retry all directory fetches". */ - directory_get_from_dirserver(DIR_PURPOSE_FETCH_DIR, NULL, 1); /*XXXX011NM*/ + /* retry appropriate downloads */ + router_reset_status_download_failures(); + router_reset_descriptor_download_failures(); + update_networkstatus_downloads(time(NULL)); + + /* We'll retry routerstatus downloads in about 10 seconds; no need to + * force a retry there. */ + if (server_mode(options)) { const char *descriptor; /* Restart cpuworker and dnsworker processes, so they get up-to-date |