This commit is contained in:
grégoire parant 2020-11-24 14:21:33 +01:00 committed by GitHub
commit c7c5dbc13d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -161,6 +161,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[] = [];