Commit 42dfcd0a authored by Hello71's avatar Hello71 Committed by David Goulet
Browse files

core/or: Lift slow call out of loop, #33977

parent f96b6cce
o Minor bugfix (refactoring):
- Lift circuit_build_times_disabled out of circuit_expire_building loop to
save CPU time with many circuits open. Fixes bug 33977; bugfix on
0.3.5.9.
......@@ -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 */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment