aboutsummaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-03-14 15:31:24 -0400
committerNick Mathewson <nickm@torproject.org>2011-03-14 15:31:24 -0400
commitf1c365b032e058e7342b632006435ecc175475a3 (patch)
tree8df6ebda1279b8d8264b42e67dcd85db7e1062cf /src/or/main.c
parentd52a99dc77dc77008b871da8bb2f95995d1abb6a (diff)
parentb639add1a010d5816ceb693c68ddc3b48655b752 (diff)
downloadtor-f1c365b032e058e7342b632006435ecc175475a3.tar
tor-f1c365b032e058e7342b632006435ecc175475a3.tar.gz
Merge remote branch 'origin/maint-0.2.2'
Fix trivial add/add conflict in main.c Conflicts: src/or/main.c
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/or/main.c b/src/or/main.c
index c1335ff5d..9c1948599 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -1049,6 +1049,7 @@ run_scheduled_events(time_t now)
static time_t time_to_write_stats_files = 0;
static time_t time_to_write_bridge_stats = 0;
static time_t time_to_check_port_forwarding = 0;
+ static time_t time_to_launch_reachability_tests = 0;
static int should_init_bridge_stats = 1;
static time_t time_to_retry_dns_init = 0;
static time_t time_to_next_heartbeat = 0;
@@ -1151,8 +1152,10 @@ run_scheduled_events(time_t now)
if (accounting_is_enabled(options))
accounting_run_housekeeping(now);
- if (now % 10 == 0 && (authdir_mode_tests_reachability(options)) &&
- !we_are_hibernating()) {
+ if (time_to_launch_reachability_tests < now &&
+ (authdir_mode_tests_reachability(options)) &&
+ !we_are_hibernating()) {
+ time_to_launch_reachability_tests = now + REACHABILITY_TEST_INTERVAL;
/* try to determine reachability of the other Tor relays */
dirserv_test_reachability(now);
}