bufferedAmount threshold uptick

This commit is contained in:
Nour Alharithi
2024-01-17 10:29:03 -08:00
parent 26799ae674
commit 4177866eac

View File

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