aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/sockets.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/sockets.js b/lib/sockets.js
index c42c9c7a..b5a2580b 100644
--- a/lib/sockets.js
+++ b/lib/sockets.js
@@ -82,6 +82,7 @@ export async function socketServer(app) {
ws.on("message", async message => {
let type, data;
+
try {
({ type, data } = JSON.parse(message));
} catch (e) {
@@ -102,8 +103,6 @@ export async function socketServer(app) {
await track(ws, data);
} catch (e) {
- // console.log(e);
- // err("caught socket error", e.message);
if (e.message.includes("not found"))
ws.send(JSON.stringify({ type: "logout" }));
setTimeout(