diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-06-13 16:55:39 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-06-13 16:55:39 -0400 |
commit | e3a6e01fe196fa1c1ae707065d515718795bc1d1 (patch) | |
tree | 62c628794bb13f76093496366acde0ab6def9251 /src/or/circuituse.c | |
parent | 7826eef93e8a3b1f90198596bfd19b589f58cc88 (diff) | |
parent | 5b0977df3153a82c51fadbda68235805b5a5cd45 (diff) | |
download | tor-e3a6e01fe196fa1c1ae707065d515718795bc1d1.tar.gz tor-e3a6e01fe196fa1c1ae707065d515718795bc1d1.zip |
Merge branch 'trac-5049-squashed'
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r-- | src/or/circuituse.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c index f43ce19c83..7532c4e923 100644 --- a/src/or/circuituse.c +++ b/src/or/circuituse.c @@ -746,6 +746,7 @@ circuit_predict_and_launch_new(void) * want, don't do another -- we want to leave a few slots open so * we can still build circuits preemptively as needed. */ if (num < MAX_UNUSED_OPEN_CIRCUITS-2 && + get_options()->LearnCircuitBuildTimeout && circuit_build_times_needs_circuits_now(&circ_times)) { flags = CIRCLAUNCH_NEED_CAPACITY; log_info(LD_CIRC, @@ -881,7 +882,8 @@ circuit_expire_old_circuits_clientside(void) tor_gettimeofday(&now); cutoff = now; - if (circuit_build_times_needs_circuits(&circ_times)) { + if (get_options()->LearnCircuitBuildTimeout && + circuit_build_times_needs_circuits(&circ_times)) { /* Circuits should be shorter lived if we need more of them * for learning a good build timeout */ cutoff.tv_sec -= IDLE_TIMEOUT_WHILE_LEARNING; |