feat(utilities): redis-remote-join

This commit is contained in:
Taha Yassine Kraiem 2022-02-22 21:14:12 +01:00
parent 10e187c98a
commit 07ca75bb2d

View file

@ -222,7 +222,7 @@ module.exports = {
debug && console.log(`notifying new agent about no SESSIONS`);
io.to(socket.id).emit(NO_SESSIONS);
}
socket.join(socket.peerId);
io.adapter.remoteJoin(socket.peerId);
let rooms = await io.of('/').adapter.allRooms();
if (rooms.has(socket.peerId)) {
let connectedSockets = await io.in(socket.peerId).fetchSockets();