This commit is contained in:
Gregoire Parant 2020-10-22 11:28:34 +02:00
parent 367afa511b
commit a68c661221

View file

@ -159,11 +159,10 @@ export class IoSocketController {
}
const userUuid = await jwtTokenManager.getUserUuidFromToken(token);
let client = socketManager.searchClientByUuid(userUuid);
const 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);
}