diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-03-09 19:45:17 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-03-09 19:56:43 -0500 |
commit | d13b996d83cb346cf81f5d9b46486556d98073d1 (patch) | |
tree | 8daa336ac60e0aaae7653c9fcb1faeaa3ba43d21 /src | |
parent | 5e0ce4c578127d6479604280430db3d40f125cd6 (diff) | |
download | tor-d13b996d83cb346cf81f5d9b46486556d98073d1.tar.gz tor-d13b996d83cb346cf81f5d9b46486556d98073d1.zip |
Fix to test for bug8444 / 6034
Diffstat (limited to 'src')
-rw-r--r-- | src/or/circuitbuild.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index f8521c5cff..24362460cd 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -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; |