diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-09-04 15:51:13 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-09-04 15:54:05 -0400 |
commit | 4f3dbb3c0a5c1a6d7d8571add3722e6c567e3d81 (patch) | |
tree | 27223037f82a6610c2119ba47f85768d001758d4 /src/or/circuituse.c | |
parent | 8611195a005ed1624bdea0632404a8c00bb19586 (diff) | |
download | tor-4f3dbb3c0a5c1a6d7d8571add3722e6c567e3d81.tar.gz tor-4f3dbb3c0a5c1a6d7d8571add3722e6c567e3d81.zip |
use !cbt_disabled in place of LearnCBT to avoid needless circs
This would make us do testing circuits "even when cbt is disabled by
consensus, or when we're a directory authority, or when we've failed
to write cbt history to our state file lately." (Roger's words.)
This is a fix for 9671 and an improvement in our fix for 5049.
The original misbehavior was in 0.2.2.14-alpha; the incomplete
fix was in 0.2.3.17-beta.
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r-- | src/or/circuituse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c index 20f124eb4e..ade4224fe5 100644 --- a/src/or/circuituse.c +++ b/src/or/circuituse.c @@ -746,7 +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_disabled() && circuit_build_times_needs_circuits_now(&circ_times)) { flags = CIRCLAUNCH_NEED_CAPACITY; log_info(LD_CIRC, @@ -882,7 +882,7 @@ circuit_expire_old_circuits_clientside(void) tor_gettimeofday(&now); cutoff = now; - if (get_options()->LearnCircuitBuildTimeout && + if (! circuit_build_times_disabled() && circuit_build_times_needs_circuits(&circ_times)) { /* Circuits should be shorter lived if we need more of them * for learning a good build timeout */ |