diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-08-04 13:10:16 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-08-04 13:10:16 -0400 |
commit | 08de260682ad32a6410f9d26d58020882d1dd859 (patch) | |
tree | 3a790e4b4e5ea65570b2f63ce66c7ae7f7fc700a /src/feature/relay/relay_periodic.c | |
parent | 4e684c8695e4654d841644fe9c13e70eabd191b9 (diff) | |
parent | 62361cc6988bba1420f89fe8273b4caf3c96b704 (diff) | |
download | tor-08de260682ad32a6410f9d26d58020882d1dd859.tar.gz tor-08de260682ad32a6410f9d26d58020882d1dd859.zip |
Merge branch 'bug40083_035' into bug40083_042
Fixes conflicts due to code movement.
Diffstat (limited to 'src/feature/relay/relay_periodic.c')
-rw-r--r-- | src/feature/relay/relay_periodic.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/feature/relay/relay_periodic.c b/src/feature/relay/relay_periodic.c index b48b495895..8a93118f11 100644 --- a/src/feature/relay/relay_periodic.c +++ b/src/feature/relay/relay_periodic.c @@ -150,6 +150,9 @@ check_for_reachability_bw_callback(time_t now, const or_options_t *options) { /* XXXX This whole thing was stuck in the middle of what is now * XXXX check_descriptor_callback. I'm not sure it's right. */ + /** How often should we consider launching reachability tests in our first + * TIMEOUT_UNTIL_UNREACHABILITY_COMPLAINT seconds? */ +#define EARLY_CHECK_REACHABILITY_INTERVAL (60) /* also, check religiously for reachability, if it's within the first * 20 minutes of our uptime. */ @@ -160,7 +163,7 @@ check_for_reachability_bw_callback(time_t now, const or_options_t *options) router_do_reachability_checks(1, dirport_reachability_count==0); if (++dirport_reachability_count > 5) dirport_reachability_count = 0; - return 1; + return EARLY_CHECK_REACHABILITY_INTERVAL; } else { /* If we haven't checked for 12 hours and our bandwidth estimate is * low, do another bandwidth test. This is especially important for |