aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/sockets.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sockets.js b/lib/sockets.js
index 87317a16..514d701a 100644
--- a/lib/sockets.js
+++ b/lib/sockets.js
@@ -56,8 +56,8 @@ wss.on("connection", function (ws, req) {
if (!sockets[username]) sockets[username] = {};
const existing = Object.keys(sockets[username]);
if (existing.length > 5) {
- l.warn("too many sockets, logging out", existing[0]);
- sockets[username][existing[0]].send(
+ l.warn("too many sockets, logging out", existing[5]);
+ sockets[username][existing[5]].send(
JSON.stringify({ type: "login", data: false })
);
}