diff --git a/src/lib/server/rate-limit.ts b/src/lib/server/rate-limit.ts index 7517e26..6b17196 100644 --- a/src/lib/server/rate-limit.ts +++ b/src/lib/server/rate-limit.ts @@ -115,6 +115,7 @@ export class ExpiringTokenBucket<_Key> { return true; } if (now - bucket.createdAt >= this.expiresInSeconds * 1000) { + bucket.createdAt = now; bucket.count = this.max; } if (bucket.count < cost) {