mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-13 06:33:44 +01:00
Fix Bug 1103.
Don't pass in a quantile that is too high during pretimeout calcualtion.
This commit is contained in:
parent
fa63d47f83
commit
fd7454f9e3
@ -643,6 +643,8 @@ circuit_build_times_count_pretimeouts(circuit_build_times_t *cbt)
|
|||||||
double timeout_quantile = 1.0-
|
double timeout_quantile = 1.0-
|
||||||
((double)cbt->pre_timeouts)/
|
((double)cbt->pre_timeouts)/
|
||||||
(cbt->pre_timeouts+cbt->total_build_times);
|
(cbt->pre_timeouts+cbt->total_build_times);
|
||||||
|
/* Make sure it doesn't exceed the synthetic max */
|
||||||
|
timeout_quantile *= MAX_SYNTHETIC_QUANTILE;
|
||||||
cbt->Xm = circuit_build_times_mode(cbt);
|
cbt->Xm = circuit_build_times_mode(cbt);
|
||||||
tor_assert(cbt->Xm > 0);
|
tor_assert(cbt->Xm > 0);
|
||||||
/* Use current timeout to get an estimate on alpha */
|
/* Use current timeout to get an estimate on alpha */
|
||||||
|
Loading…
Reference in New Issue
Block a user