diff options
author | Mike Perry <mikeperry-git@fscked.org> | 2009-09-21 20:01:20 -0700 |
---|---|---|
committer | Mike Perry <mikeperry-git@fscked.org> | 2009-09-21 20:01:20 -0700 |
commit | fd7454f9e30f39d6f026dfc08eb5a7a34d8bb08a (patch) | |
tree | c5fb7c7f865ab688fe7c0b6506914dfdacb9ebdc /src | |
parent | fa63d47f8330fe079e2948772d2ad3e4f50f5070 (diff) | |
download | tor-fd7454f9e30f39d6f026dfc08eb5a7a34d8bb08a.tar.gz tor-fd7454f9e30f39d6f026dfc08eb5a7a34d8bb08a.zip |
Fix Bug 1103.
Don't pass in a quantile that is too high during pretimeout
calcualtion.
Diffstat (limited to 'src')
-rw-r--r-- | src/or/circuitbuild.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index b1de024168..adf53a8b10 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -643,6 +643,8 @@ circuit_build_times_count_pretimeouts(circuit_build_times_t *cbt) double timeout_quantile = 1.0- ((double)cbt->pre_timeouts)/ (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); tor_assert(cbt->Xm > 0); /* Use current timeout to get an estimate on alpha */ |