mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Fix to test for bug8444 / 6034
This commit is contained in:
parent
5e0ce4c578
commit
d13b996d83
@ -540,6 +540,7 @@ circuit_build_times_get_initial_timeout(void)
|
||||
* Check if we have LearnCircuitBuildTimeout, and if we don't,
|
||||
* always use CircuitBuildTimeout, no questions asked.
|
||||
*/
|
||||
/*XXXX025 this logic could be cleaned up a lot. */
|
||||
if (get_options()->LearnCircuitBuildTimeout) {
|
||||
if (!unit_tests && get_options()->CircuitBuildTimeout) {
|
||||
timeout = get_options()->CircuitBuildTimeout*1000;
|
||||
@ -552,7 +553,10 @@ circuit_build_times_get_initial_timeout(void)
|
||||
timeout = circuit_build_times_initial_timeout();
|
||||
}
|
||||
} else {
|
||||
timeout = get_options()->CircuitBuildTimeout*1000;
|
||||
if (get_options()->CircuitBuildTimeout > 0)
|
||||
timeout = get_options()->CircuitBuildTimeout*1000;
|
||||
else
|
||||
timeout = circuit_build_times_initial_timeout();
|
||||
}
|
||||
|
||||
return timeout;
|
||||
|
Loading…
Reference in New Issue
Block a user