bufferedAmount threshold uptick

This commit is contained in:
Nour Alharithi
2024-01-17 10:29:57 -08:00
parent d373bbd6c3
commit 3a1788fc7b

View File

@@ -103,7 +103,7 @@ async function main() {
const subscribers = channelSubscribers.get(subscribedChannel);
if (subscribers) {
subscribers.forEach((ws) => {
if (ws.readyState === WebSocket.OPEN && ws.bufferedAmount < 100)
if (ws.readyState === WebSocket.OPEN && ws.bufferedAmount < 300000)
ws.send(
JSON.stringify({ channel: subscribedChannel, data: message })
);