diff options
author | George Kadianakis <desnacked@riseup.net> | 2020-08-12 13:47:59 +0300 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2020-08-12 13:47:59 +0300 |
commit | 347f87ae9dae72c193b9c22906efea960fe60986 (patch) | |
tree | 7c4c72c8ba0c94094e64007c16a358a78f10742a /src/feature | |
parent | c591a0d2466cdc644fd82519f6f1ec32da764287 (diff) | |
parent | 5a1918d7e748c7ef2c95b54e29b171caae30f453 (diff) | |
download | tor-347f87ae9dae72c193b9c22906efea960fe60986.tar.gz tor-347f87ae9dae72c193b9c22906efea960fe60986.zip |
Merge branch 'maint-0.4.4'
Diffstat (limited to 'src/feature')
-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 adff2c6a23..ac54064901 100644 --- a/src/feature/relay/relay_periodic.c +++ b/src/feature/relay/relay_periodic.c @@ -154,6 +154,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. */ @@ -164,7 +167,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 |