diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-03-20 10:31:28 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-03-20 10:31:56 -0400 |
commit | 5b0b51ca3ff55d6e82081adf4cb1dbfa24ac4872 (patch) | |
tree | 23f6d7ccd5e79a3e25726c2df0912dee48dc5528 /src/or/circuitstats.c | |
parent | f1caa2f2146ac750962e6506fe672b03749c50f9 (diff) | |
parent | b9a8f8c17ce11dd867e0afec7cbb65c55a3d7e8c (diff) | |
download | tor-5b0b51ca3ff55d6e82081adf4cb1dbfa24ac4872.tar.gz tor-5b0b51ca3ff55d6e82081adf4cb1dbfa24ac4872.zip |
Merge remote-tracking branch 'public/bug6304_v3' into maint-0.2.4
Conflicts:
src/or/circuitbuild.c
src/or/config.c
Diffstat (limited to 'src/or/circuitstats.c')
-rw-r--r-- | src/or/circuitstats.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/or/circuitstats.c b/src/or/circuitstats.c index 73e34d9ed7..fe9c80ddce 100644 --- a/src/or/circuitstats.c +++ b/src/or/circuitstats.c @@ -417,19 +417,16 @@ circuit_build_times_get_initial_timeout(void) * Check if we have LearnCircuitBuildTimeout, and if we don't, * always use CircuitBuildTimeout, no questions asked. */ - if (get_options()->LearnCircuitBuildTimeout) { - if (!unit_tests && get_options()->CircuitBuildTimeout) { - timeout = get_options()->CircuitBuildTimeout*1000; - if (timeout < circuit_build_times_min_timeout()) { - log_warn(LD_CIRC, "Config CircuitBuildTimeout too low. Setting to %ds", - circuit_build_times_min_timeout()/1000); - timeout = circuit_build_times_min_timeout(); - } - } else { - timeout = circuit_build_times_initial_timeout(); + if (!unit_tests && get_options()->CircuitBuildTimeout) { + timeout = get_options()->CircuitBuildTimeout*1000; + if (get_options()->LearnCircuitBuildTimeout && + timeout < circuit_build_times_min_timeout()) { + log_warn(LD_CIRC, "Config CircuitBuildTimeout too low. Setting to %ds", + circuit_build_times_min_timeout()/1000); + timeout = circuit_build_times_min_timeout(); } } else { - timeout = get_options()->CircuitBuildTimeout*1000; + timeout = circuit_build_times_initial_timeout(); } return timeout; |