Fix issue with disconnecting listener.
This commit is contained in:
parent
0718ec5447
commit
9517936277
@ -110,7 +110,7 @@ try {
|
|||||||
|
|
||||||
socket.on("disconnecting", async () => {
|
socket.on("disconnecting", async () => {
|
||||||
socketDebug(`${socket.id} has disconnected`);
|
socketDebug(`${socket.id} has disconnected`);
|
||||||
for (const roomID in socket.rooms) {
|
for (const roomID of Array.from(socket.rooms)) {
|
||||||
const otherClients = (await io.in(roomID).fetchSockets()).filter(
|
const otherClients = (await io.in(roomID).fetchSockets()).filter(
|
||||||
(_socket) => _socket.id !== socket.id,
|
(_socket) => _socket.id !== socket.id,
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user