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) } }