aboutsummaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2011-03-11 22:12:15 -0500
committerRoger Dingledine <arma@torproject.org>2011-03-11 22:12:15 -0500
commit977e396e866052a20de73f4e8121e514d4eff774 (patch)
treebc98cac8752caa9d31bbc4c880795d01705387e3 /src/or/main.c
parent600ad7bf8d499d04259586bcf91afed7dfb88f99 (diff)
downloadtor-977e396e866052a20de73f4e8121e514d4eff774.tar.gz
tor-977e396e866052a20de73f4e8121e514d4eff774.zip
improve accuracy for when a relay went unreachable
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 979a2bec5c..558608ec8c 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -962,8 +962,9 @@ 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 (now % REACHABILITY_TEST_PERIOD/REACHABILITY_MODULO_PER_TEST == 0 &&
+ (authdir_mode_tests_reachability(options)) &&
+ !we_are_hibernating()) {
/* try to determine reachability of the other Tor relays */
dirserv_test_reachability(now);
}