From a6b193d99f1dd88674291367df4d09cb117ef5d3 Mon Sep 17 00:00:00 2001 From: Minteck Date: Sat, 2 Oct 2021 18:37:33 +0200 Subject: Fix the code that contains invalid characters --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'index.js') diff --git a/index.js b/index.js index c325a13..95623ff 100644 --- a/index.js +++ b/index.js @@ -54,9 +54,9 @@ class KartikError extends Error { const server = new Net.Server(); server.on('connection', (socket) => { - socket.connectionId = "ird-" + (Math.random().toString().split(".")[1] + Math.random().toString().split(".")[1]).substr(0, 4); + socket.connectionId = "irid" + (Math.random().toString().split(".")[1] + Math.random().toString().split(".")[1]).substr(0, 4); while (Object.keys(clients).includes(socket.connectionId)) { - socket.connectionId = "ird-" + (Math.random().toString().split(".")[1] + Math.random().toString().split(".")[1]).substr(0, 4); + socket.connectionId = "irid" + (Math.random().toString().split(".")[1] + Math.random().toString().split(".")[1]).substr(0, 4); } socket.linkedTo = null; clients[socket.connectionId] = socket; -- cgit