bufferedAmount threshold uptick
This commit is contained in:
@@ -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 })
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user