diff --git a/server/routes/games.js b/server/routes/games.js index 53c5ee4..87304e9 100755 --- a/server/routes/games.js +++ b/server/routes/games.js @@ -3175,7 +3175,7 @@ const sendUpdateToPlayers = async (game, update) => { continue; } if (!session.ws) { - console.log(`${_session.id}: -> sendUpdateToPlayers: ` + + console.log(`${session.id}: -> sendUpdateToPlayers: ` + `Currently no connection.`); } else { session.ws.send(message); @@ -3481,12 +3481,13 @@ router.ws("/ws/:id", async (ws, req) => { if (game.state === 'winner' || game.state === 'lobby') { let dead = true; for (let id in game.sessions) { - if (game.sessions[id].live && game.sessions[id].color) { + if (game.sessions[id].live && game.sessions[id].name) { dead = false; } } if (dead) { - console.log(`${session.id}: No more players in ${game.id}. Removing.`); + console.log(`${session.id}: No more players in ${game.id}. ` + + `Removing.`); addChatMessage(game, null, `No more active players in game. ` + `It is being removed from the server.`); sendUpdateToPlayers(game, {