fix username duplication bug
This commit is contained in:
parent
6893c62c08
commit
b815ab506d
1 changed files with 1 additions and 1 deletions
|
@ -114,7 +114,7 @@ export class Client extends EventEmitter {
|
||||||
switch (msg.op) {
|
switch (msg.op) {
|
||||||
case MSAgentProtocolMessageType.Join: {
|
case MSAgentProtocolMessageType.Join: {
|
||||||
let joinMsg = msg as MSAgentJoinMessage;
|
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();
|
this.socket.close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue