From b815ab506df4ffdfefe3e20572490cad9b552380 Mon Sep 17 00:00:00 2001 From: Elijah R Date: Wed, 17 Jul 2024 13:16:37 -0400 Subject: [PATCH] fix username duplication bug --- server/src/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/client.ts b/server/src/client.ts index 930518e..7e94303 100644 --- a/server/src/client.ts +++ b/server/src/client.ts @@ -114,7 +114,7 @@ export class Client extends EventEmitter { switch (msg.op) { case MSAgentProtocolMessageType.Join: { let joinMsg = msg as MSAgentJoinMessage; - if (!joinMsg.data || !joinMsg.data.username || !joinMsg.data.username) { + if (this.username !== null || !joinMsg.data || !joinMsg.data.username || !joinMsg.data.username) { this.socket.close(); return; }