aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/circuituse.c
diff options
context:
space:
mode:
authorAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2020-04-23 13:24:08 -0400
committerDavid Goulet <dgoulet@torproject.org>2020-05-05 15:07:42 -0400
commit42dfcd0ae3f7a872a781452c289b4e47c494d122 (patch)
tree999f68214cb0427a6e879989c9bf6ad8c55b01cc /src/core/or/circuituse.c
parentf96b6ccee1945b2db32c858837ac21c6d81c820b (diff)
downloadtor-42dfcd0ae3f7a872a781452c289b4e47c494d122.tar.gz
tor-42dfcd0ae3f7a872a781452c289b4e47c494d122.zip
core/or: Lift slow call out of loop, #33977
Diffstat (limited to 'src/core/or/circuituse.c')
-rw-r--r--src/core/or/circuituse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/or/circuituse.c b/src/core/or/circuituse.c
index 066d5d437a..419ad07f71 100644
--- a/src/core/or/circuituse.c
+++ b/src/core/or/circuituse.c
@@ -548,9 +548,10 @@ circuit_expire_building(void)
MAX(get_circuit_build_close_time_ms()*2 + 1000,
options->SocksTimeout * 1000));
+ bool fixed_time = circuit_build_times_disabled(get_options());
+
SMARTLIST_FOREACH_BEGIN(circuit_get_global_list(), circuit_t *,victim) {
struct timeval cutoff;
- bool fixed_time = circuit_build_times_disabled(get_options());
if (!CIRCUIT_IS_ORIGIN(victim) || /* didn't originate here */
victim->marked_for_close) /* don't mess with marked circs */