aboutsummaryrefslogtreecommitdiff
path: root/src/feature/stats/rephist.c
diff options
context:
space:
mode:
authorNeel Chauhan <neel@neelc.org>2021-05-20 11:06:50 -0700
committerNeel Chauhan <neel@neelc.org>2021-05-20 11:06:50 -0700
commit96b59fc4d3486c06d3661adb34a5d32d5ff8e842 (patch)
tree99b3a84692e2681c305649e5c5723a49b3d55d79 /src/feature/stats/rephist.c
parente247aab4eceeb3920f1667bf5a11d5bc83b950cc (diff)
downloadtor-96b59fc4d3486c06d3661adb34a5d32d5ff8e842.tar.gz
tor-96b59fc4d3486c06d3661adb34a5d32d5ff8e842.zip
Fix the fencepost issue when we check stability_last_downrated
Diffstat (limited to 'src/feature/stats/rephist.c')
-rw-r--r--src/feature/stats/rephist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/feature/stats/rephist.c b/src/feature/stats/rephist.c
index 50f6a11ae1..59d5313cc8 100644
--- a/src/feature/stats/rephist.c
+++ b/src/feature/stats/rephist.c
@@ -731,7 +731,7 @@ rep_hist_downrate_old_runs(time_t now)
return stability_last_downrated + STABILITY_INTERVAL;
/* Okay, we should downrate the data. By how much? */
- while (stability_last_downrated + STABILITY_INTERVAL < now) {
+ while (stability_last_downrated + STABILITY_INTERVAL <= now) {
stability_last_downrated += STABILITY_INTERVAL;
alpha *= STABILITY_ALPHA;
}