From 2d9a34f8bc4db0f73542822f89f6466636f07d7d Mon Sep 17 00:00:00 2001 From: Ayush Mukherjee Date: Fri, 19 Mar 2021 23:36:39 +0530 Subject: [PATCH] idk --- src/ws/handler.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/ws/handler.js b/src/ws/handler.js index 6d7d97e..4afe418 100644 --- a/src/ws/handler.js +++ b/src/ws/handler.js @@ -76,13 +76,14 @@ const fanoutMsg = (channel, data) => { data, } connections[k].connection.send(JSON.stringify(d)) - } else if (connections[k].events.indexOf('streams:full') !== -1) { - const m = await crud['streams'].getAllPop() - const d = { - event: 'streams:full', - data: m, + if (connections[k].events.indexOf('streams:full') !== -1) { + const m = await crud['streams'].getAllPop() + const d = { + event: 'streams:full', + data: m, + } + connections[k].connection.send(JSON.stringify(d)) } - connections[k].connection.send(JSON.stringify(d)) } }) }