From 220e112c833ec9b382658caee99eabdb6ec330ef Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Sat, 15 Jun 2024 08:42:13 +0900 Subject: [PATCH] fix rate limit check never ends (#13994) --- packages/backend/src/server/api/RateLimiterService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/server/api/RateLimiterService.ts b/packages/backend/src/server/api/RateLimiterService.ts index cae106c273..52d73baa0a 100644 --- a/packages/backend/src/server/api/RateLimiterService.ts +++ b/packages/backend/src/server/api/RateLimiterService.ts @@ -57,7 +57,7 @@ export class RateLimiterService { return reject({ code: 'BRIEF_REQUEST_INTERVAL', info }); } else { if (hasLongTermLimit) { - return max; + return max.then(ok, reject); } else { return ok(); }