summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/api/stream/Connection.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/backend/src/server/api/stream/Connection.ts')
-rw-r--r--packages/backend/src/server/api/stream/Connection.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/backend/src/server/api/stream/Connection.ts b/packages/backend/src/server/api/stream/Connection.ts
index b71a99b89e..7ea92eb797 100644
--- a/packages/backend/src/server/api/stream/Connection.ts
+++ b/packages/backend/src/server/api/stream/Connection.ts
@@ -120,7 +120,9 @@ export default class Connection {
if (this.closingConnection) return;
if (this.rateLimiter) {
- if (this.activeRateLimitRequests <= 128) {
+ // this 4096 should match the `max` of the `rateLimiter`, see
+ // StreamingApiServerService
+ if (this.activeRateLimitRequests <= 4096) {
this.activeRateLimitRequests++;
const shouldRateLimit = await this.rateLimiter();
this.activeRateLimitRequests--;