From c9afba3c8ef1a6673fe130b371bfd8f4a1208e17 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Wed, 14 Aug 2019 16:16:51 -0400 Subject: [PATCH] Use >= instead of > --- lib/src/rate_limiter.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/rate_limiter.dart b/lib/src/rate_limiter.dart index dbe5a287..fb8b99cd 100644 --- a/lib/src/rate_limiter.dart +++ b/lib/src/rate_limiter.dart @@ -129,10 +129,10 @@ abstract class RateLimiter { // // Otherwise, update the current window. // - // We only use `>` (not `>=`), because at this point in the computation, + // At this point in the computation, // we are still only considering whether the *previous* request took the // user over the rate limit. - else if (currentWindow.pointsConsumed > maxPointsPerWindow) { + else if (currentWindow.pointsConsumed >= maxPointsPerWindow) { await sendWindowInformation(req, res, currentWindow); var result = await rejectRequest(req, res, currentWindow, now); if (result != null) return result;