summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/api/StreamingApiServerService.ts
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2024-08-18 17:57:51 +0100
committerdakkar <dakkar@thenautilus.net>2024-08-18 17:57:51 +0100
commit77144b058c48fc7b5f51ad992151c20447cf28d9 (patch)
tree97892764b7e8bd9d7b7d4f34e9894b48ff60036a /packages/backend/src/server/api/StreamingApiServerService.ts
parentmerge: fix `offsetMode` in `MkPagination` - fixes #622 (!599) (diff)
downloadsharkey-77144b058c48fc7b5f51ad992151c20447cf28d9.tar.gz
sharkey-77144b058c48fc7b5f51ad992151c20447cf28d9.tar.bz2
sharkey-77144b058c48fc7b5f51ad992151c20447cf28d9.zip
make the cap of `activeRateLimitRequests` match the rate limit
It's trivial to have more than 128 requests in flight: open a busy timeline, scroll a bit down, wait for many notes to arrive, scroll to the top. The frontend will send "subscribe to note" messages for each new note that it accumulated, all at once. We don't want to shut down the connection in those common cases!
Diffstat (limited to 'packages/backend/src/server/api/StreamingApiServerService.ts')
-rw-r--r--packages/backend/src/server/api/StreamingApiServerService.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/backend/src/server/api/StreamingApiServerService.ts b/packages/backend/src/server/api/StreamingApiServerService.ts
index a2dafb2ebd..9b8464f705 100644
--- a/packages/backend/src/server/api/StreamingApiServerService.ts
+++ b/packages/backend/src/server/api/StreamingApiServerService.ts
@@ -151,7 +151,7 @@ export class StreamingApiServerService {
return this.rateLimitThis(user, requestIp, {
key: 'wsmessage',
duration: ms('2sec'),
- max: 4090,
+ max: 4096,
});
};