From c2464b2407ee23134732fd67586758dbfe18f9b5 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 6 Sep 2022 09:20:25 -0700 Subject: prettier --- lib/sockets.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/sockets.js') diff --git a/lib/sockets.js b/lib/sockets.js index 366820e0..252ee552 100644 --- a/lib/sockets.js +++ b/lib/sockets.js @@ -100,10 +100,12 @@ app.register(async function(app) { const existing = Object.keys(store.sockets[username]); if (existing.length > 4) { const p = existing.find(sid => sid !== id); - store.sockets[username][p].send(JSON.stringify({ type: "logout" })); + store.sockets[username][p].send( + JSON.stringify({ type: "logout" }) + ); setTimeout(() => { if (store.sockets[username][p]) - store.sockets[username][p].close(code, "too many sockets"); + store.sockets[username][p].close(code, "too many sockets"); }, 5000); } store.sockets[username][id] = ws; -- cgit v1.2.3