From 524e87edee6bf88b8a066ff146adfb75520acd20 Mon Sep 17 00:00:00 2001 From: Benjamin Auder Date: Wed, 17 Nov 2021 15:00:02 +0100 Subject: [PATCH] Cosmetics --- server.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server.js b/server.js index 7dbbaac..a068c6e 100644 --- a/server.js +++ b/server.js @@ -10,14 +10,14 @@ const variants = require("./variants.js"); const Crypto = require("crypto"); const randstrSize = 8; -const send = (sid, code, data) => { +function send(sid, code, data) { const socket = sockets[sid]; // If a player deletes local infos and then tries to resume a game, // sockets[oppSid] will probably not exist anymore: if (socket) socket.send(JSON.stringify(Object.assign({ code: code }, data))); -}; +} -wss.on("connection", function connection(socket, req) { +wss.on("connection", (socket, req) => { const sid = req.url.split("=")[1]; //...?sid=... sockets[sid] = socket; socket.isAlive = true; -- 2.44.0