Close previous client socket if uuid client socket already exist
This commit is contained in:
parent
b7d883b2e7
commit
367afa511b
|
@ -159,6 +159,13 @@ export class IoSocketController {
|
|||
}
|
||||
|
||||
const userUuid = await jwtTokenManager.getUserUuidFromToken(token);
|
||||
let client = socketManager.searchClientByUuid(userUuid);
|
||||
//if client socket exist, close connexion
|
||||
if(client){
|
||||
console.info(`Close connexion, client with uuid : ${userUuid} already exist !`);
|
||||
socketManager.emitCloseMessage(client, 500);
|
||||
socketManager.leaveRoom(client);
|
||||
}
|
||||
|
||||
let memberTags: string[] = [];
|
||||
let memberTextures: CharacterTexture[] = [];
|
||||
|
|
Loading…
Reference in a new issue