From fb23f49a2810e484cfc2cb81610a5cdd53c7e070 Mon Sep 17 00:00:00 2001 From: Elijahr2411 Date: Thu, 23 Feb 2023 16:45:57 -0500 Subject: [PATCH] fix bug which broke turns if an admin disconnected while they had an indefinite turn --- src/WSServer.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/WSServer.ts b/src/WSServer.ts index eb3e6fa..0be9311 100644 --- a/src/WSServer.ts +++ b/src/WSServer.ts @@ -162,6 +162,7 @@ export default class WSServer { private connectionClosed(user : User) { if(user.IP.vote != null) user.IP.vote = null; + if (this.indefiniteTurn === user) this.indefiniteTurn = null; this.clients.splice(this.clients.indexOf(user), 1); console.log(`[DISCONNECT] From ${user.IP.address}${user.username ? ` with username ${user.username}` : ""}`); if (!user.username) return;