From f2445d666d4153b17d9545479c7888b98932a650 Mon Sep 17 00:00:00 2001 From: Ayush Mukherjee Date: Fri, 26 Mar 2021 16:15:32 +0530 Subject: [PATCH] attempt 3 --- src/ws/streams.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ws/streams.js b/src/ws/streams.js index 856685b..a1b38a6 100644 --- a/src/ws/streams.js +++ b/src/ws/streams.js @@ -36,13 +36,15 @@ const recvUpdate = async (channel, data) => { } const sendInitial = async (id) => { - if (id != null || id != '') { + try { const c = connections[id] const stream = await crud['streams'].getById(c.streamid) c.connection.send(JSON.stringify({ event: 'streams:read', data: stream, })) + } catch (e) { + console.warn(e) } }