Skip to content

Commit 5d2fce4

Browse files
MineKing9534WolverinDEV
authored andcommitted
fix: remove session watch limit
1 parent 6e64131 commit 5d2fce4

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

packages/backend/src/network/createSocketServer.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ type ClientSocketData = {
5555
type ClientSocket = Socket<ClientToServerEvents, ServerToClientEvents, any, ClientSocketData>;
5656

5757
const LOBBY_LIST_DEBOUNCE_MS = 1_000;
58-
const MAX_WATCHED_SESSIONS_PER_SOCKET = 4;
5958

6059
function getProfileRoom(profileId: string) {
6160
return `profile:${profileId}`;
@@ -277,13 +276,6 @@ export class SocketServerGateway {
277276
}
278277

279278
const watchedSessions = this.getOrCreateWatchedSessions(socket.id);
280-
if (!watchedSessions.has(request.sessionId) && watchedSessions.size >= MAX_WATCHED_SESSIONS_PER_SOCKET) {
281-
socket.emit(`session-watch-error`, {
282-
sessionId: request.sessionId,
283-
message: `You can only watch up to ${MAX_WATCHED_SESSIONS_PER_SOCKET} live matches at once.`,
284-
});
285-
return;
286-
}
287279

288280
watchedSessions.add(request.sessionId);
289281
await socket.join(request.sessionId);

0 commit comments

Comments
 (0)