瀏覽代碼

Fix Bug 1103.

Don't pass in a quantile that is too high during pretimeout
calcualtion.
Mike Perry 16 年之前
父節點
當前提交
fd7454f9e3
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/or/circuitbuild.c

+ 2 - 0
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 */