Removing limitation to allow up to 4 players in a group
authorDavid Négrier <d.negrier@thecodingmachine.com>
Wed, 13 May 2020 07:39:48 +0000 (09:39 +0200)
committerDavid Négrier <d.negrier@thecodingmachine.com>
Wed, 13 May 2020 07:39:48 +0000 (09:39 +0200)
back/src/Controller/IoSocketController.ts

index 9f7de4ec338acbd04b0ad6ef5c350559a56ee7c1..672fbcacb78a5828a4d9095ec291d3b07c8d5f9f 100644 (file)
@@ -282,8 +282,8 @@ export class IoSocketController {
         }
         socket.join(roomId);
         socket.webRtcRoomId = roomId;
-        //if two persone in room share
-        if (this.Io.sockets.adapter.rooms[roomId].length < 2 || this.Io.sockets.adapter.rooms[roomId].length >= 4) {
+        //if two persons in room share
+        if (this.Io.sockets.adapter.rooms[roomId].length < 2 /*|| this.Io.sockets.adapter.rooms[roomId].length >= 4*/) {
             return;
         }
         let clients: Array<ExSocketInterface> = (Object.values(this.Io.sockets.sockets) as Array<ExSocketInterface>)