mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 04:13:28 +01:00
Unconditionally use config CircuitBuildTimeout if LearnCircuitBuildTimeout is disabled
This commit is contained in:
parent
5177ab9e47
commit
7df26de948
@ -535,6 +535,12 @@ static double
|
||||
circuit_build_times_get_initial_timeout(void)
|
||||
{
|
||||
double timeout;
|
||||
|
||||
/*
|
||||
* 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()) {
|
||||
@ -545,6 +551,11 @@ circuit_build_times_get_initial_timeout(void)
|
||||
} else {
|
||||
timeout = circuit_build_times_initial_timeout();
|
||||
}
|
||||
}
|
||||
else {
|
||||
timeout = get_options()->CircuitBuildTimeout*1000;
|
||||
}
|
||||
|
||||
return timeout;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user