fix bug which broke turns if an admin disconnected while they had an indefinite turn

This commit is contained in:
Elijahr2411
2023-02-23 16:45:57 -05:00
parent a931188b9e
commit fb23f49a28

View File

@@ -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;