aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-05-20 16:57:47 -0400
committerNick Mathewson <nickm@torproject.org>2014-05-23 11:22:35 -0400
commit802c063148e7aaf62e9f07ee5043a7451a888b82 (patch)
tree138b724f3f259ca6d213c3447738b67644446f16
parentfef65fa64341fb70df0e7b34d91d3b08a74e7aad (diff)
downloadtor-802c063148e7aaf62e9f07ee5043a7451a888b82.tar
tor-802c063148e7aaf62e9f07ee5043a7451a888b82.tar.gz
Postpone fetches based on should_delay_dir_fetch(), not DisableNetwork
Without this fix, when running with bridges, we would try fetching directory info far too early, and have up to a 60 second delay if we started with bridge descriptors available. Fixes bug 11965. Fix on 0.2.3.6-alpha, arma thinks.
-rw-r--r--changes/bug119656
-rw-r--r--src/or/main.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/changes/bug11965 b/changes/bug11965
new file mode 100644
index 000000000..a3bfd876b
--- /dev/null
+++ b/changes/bug11965
@@ -0,0 +1,6 @@
+ o Minor bugfixes:
+
+ - Avoid another 60-second delay when starting Tor in a
+ pluggable-transport-using configuration when we already have
+ cached descriptors for our bridges. Fixes bug 11965; bugfix on
+ 0.2.3.6-alpha.
diff --git a/src/or/main.c b/src/or/main.c
index 025b5192b..6f6066a93 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -1231,7 +1231,8 @@ run_scheduled_events(time_t now)
router_upload_dir_desc_to_dirservers(0);
}
- if (!options->DisableNetwork && time_to_try_getting_descriptors < now) {
+ if (!should_delay_dir_fetches(options, NULL) &&
+ time_to_try_getting_descriptors < now) {
update_all_descriptor_downloads(now);
update_extrainfo_downloads(now);
if (router_have_minimum_dir_info())
@@ -1461,7 +1462,8 @@ run_scheduled_events(time_t now)
* documents? */
#define networkstatus_dl_check_interval(o) ((o)->TestingTorNetwork ? 1 : 60)
- if (time_to_download_networkstatus < now && !options->DisableNetwork) {
+ if (!should_delay_dir_fetches(options, NULL) &&
+ time_to_download_networkstatus < now) {
time_to_download_networkstatus =
now + networkstatus_dl_check_interval(options);
update_networkstatus_downloads(now);