diff options
author | Roger Dingledine <arma@torproject.org> | 2006-07-22 05:29:31 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2006-07-22 05:29:31 +0000 |
commit | 41cf27d1636dd01ca42c741c3093005a2e07c1b6 (patch) | |
tree | 19ed423417ee76942db123f16474338a7a6340d7 | |
parent | 370608cc1edb8f9a11d70a0e8556c61aff73ea05 (diff) | |
download | tor-41cf27d1636dd01ca42c741c3093005a2e07c1b6.tar.gz tor-41cf27d1636dd01ca42c741c3093005a2e07c1b6.zip |
more bulletproof reachability testing
svn:r6804
-rw-r--r-- | trunk/src/or/config.c | 3 | ||||
-rw-r--r-- | trunk/src/or/main.c | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/trunk/src/or/config.c b/trunk/src/or/config.c index fcca7acf91..e0dd745a98 100644 --- a/trunk/src/or/config.c +++ b/trunk/src/or/config.c @@ -796,7 +796,8 @@ options_act(or_options_t *old_options) return -1; } server_has_changed_ip(); - if (has_completed_circuit) + if (has_completed_circuit || + rep_hist_circbuilding_dormant(time(NULL))) inform_testing_reachability(); } cpuworkers_rotate(); diff --git a/trunk/src/or/main.c b/trunk/src/or/main.c index 6623c10f79..ca3742a5c9 100644 --- a/trunk/src/or/main.c +++ b/trunk/src/or/main.c @@ -568,8 +568,8 @@ directory_info_has_arrived(time_t now, int from_cache) return; } - if (server_mode(options) && !we_are_hibernating() && - !from_cache && has_completed_circuit) + if (server_mode(options) && !we_are_hibernating() && !from_cache && + (has_completed_circuit || rep_hist_circbuilding_dormant(now))) consider_testing_reachability(); } @@ -833,7 +833,7 @@ run_scheduled_events(time_t now) /* also, check religiously for reachability, if it's within the first * 20 minutes of our uptime. */ if (server_mode(options) && - has_completed_circuit && + (has_completed_circuit || rep_hist_circbuilding_dormant(now)) && stats_n_seconds_working < TIMEOUT_UNTIL_UNREACHABILITY_COMPLAINT && !we_are_hibernating()) consider_testing_reachability(); |