mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 12:23:32 +01:00
no measurement circs if not enough build times
In the first 100 circuits, our timeout_ms and close_ms are the same. So we shouldn't transition circuits to purpose CIRCUIT_PURPOSE_C_MEASURE_TIMEOUT, since they will just timeout again next time we check.
This commit is contained in:
parent
7f10707c42
commit
ceb3d4d578
@ -384,7 +384,8 @@ circuit_expire_building(time_t now)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (circuit_timeout_want_to_count_circ(TO_ORIGIN_CIRCUIT(victim))) {
|
||||
if (circuit_timeout_want_to_count_circ(TO_ORIGIN_CIRCUIT(victim)) &&
|
||||
circuit_build_times_enough_to_compute(&circ_times)) {
|
||||
/* Circuits are allowed to last longer for measurement.
|
||||
* Switch their purpose and wait. */
|
||||
if (victim->purpose != CIRCUIT_PURPOSE_C_MEASURE_TIMEOUT) {
|
||||
|
Loading…
Reference in New Issue
Block a user