Compare commits

...

2 commits

Author SHA1 Message Date
Gregoire Parant a68c661221 Fix CI 2020-10-22 11:28:34 +02:00
Gregoire Parant 367afa511b Close previous client socket if uuid client socket already exist 2020-10-22 11:26:01 +02:00

View file

@ -159,6 +159,12 @@ export class IoSocketController {
}
const userUuid = await jwtTokenManager.getUserUuidFromToken(token);
const client = socketManager.searchClientByUuid(userUuid);
//if client socket exist, close connexion
if(client){
console.info(`Close connexion, client with uuid : ${userUuid} already exist !`);
socketManager.leaveRoom(client);
}
let memberTags: string[] = [];
let memberTextures: CharacterTexture[] = [];