feat(assist): added more debug logs

This commit is contained in:
Alexander Zavorotynskiy 2023-06-02 12:22:14 +02:00 committed by nick-delirium
parent 0729e99928
commit 28c64b36cd

View file

@ -271,7 +271,9 @@ module.exports = {
let {projectKey} = extractPeerId(roomId);
if (projectKey === connProjectKey) {
const connected_sockets = await io.in(roomId).fetchSockets();
debug && console.log(`connected_sockets:${JSON.stringify(connected_sockets)}`);
for (let item of connected_sockets) {
debug && console.log(`conn.tabId: ${item.tabId}`);
if (item.tabId === connTabId) {
debug && console.log(`session already connected, refusing new connexion`);
io.to(socket.id).emit(EVENTS_DEFINITION.emit.SESSION_ALREADY_CONNECTED);