Skip to content

Commit

Permalink
fix: regression in throttle middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Feb 5, 2024
1 parent 0733c4c commit cac6e40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/http_limiter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export class HttpLimiter<KnownStores extends Record<string, LimiterManagerStoreF
/**
* Abort when user has exhausted all the requests
*/
if (limiterResponse && limiterResponse.remaining <= 0) {
if (limiterResponse && limiterResponse.remaining < 0) {
debug('requests exhausted for key "%s"', key)
const error = new E_TOO_MANY_REQUESTS(limiterResponse)
this.#exceptionModifier(error)
Expand Down

0 comments on commit cac6e40

Please sign in to comment.