Simple limit connexion in room

This commit is contained in:
Gregoire Parant 2020-10-21 23:45:08 +02:00
parent cad94c7982
commit 3a565362a2
3 changed files with 10 additions and 0 deletions

View file

@ -163,6 +163,9 @@ export class IoSocketController {
let memberTags: string[] = [];
let memberTextures: CharacterTexture[] = [];
const room = await socketManager.getOrCreateRoom(roomId);
if(room.isFull){
throw new Error('Room is full');
}
try {
const userData = await adminApi.fetchMemberDataByUuid(userUuid);
//console.log('USERDATA', userData)