aboutsummaryrefslogtreecommitdiff
path: root/index.js
diff options
context:
space:
mode:
authorMinteck <minteck@phoenixnet.tech>2021-10-02 18:37:33 +0200
committerMinteck <minteck@phoenixnet.tech>2021-10-02 18:37:33 +0200
commita6b193d99f1dd88674291367df4d09cb117ef5d3 (patch)
treef48acef0aeac6352ed6f95950104ee92a87edf05 /index.js
parent4a210e42a235bfa190ab730c1043dd97becbc775 (diff)
downloadkartik-iridium-a6b193d99f1dd88674291367df4d09cb117ef5d3.tar.gz
kartik-iridium-a6b193d99f1dd88674291367df4d09cb117ef5d3.tar.bz2
kartik-iridium-a6b193d99f1dd88674291367df4d09cb117ef5d3.zip
Fix the code that contains invalid characters
Diffstat (limited to 'index.js')
-rw-r--r--index.js4
1 files changed, 2 insertions, 2 deletions
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;