Skip to content

Commit f6b16f2

Browse files
authored
Fix clientsInRoom function
simplewebrtc#77
1 parent ce75f86 commit f6b16f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sockets.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ module.exports = function (io, config) {
135135
}
136136

137137
function clientsInRoom(name) {
138-
return io.sockets.clients(name).length;
138+
return Object.keys(io.nsps['/'].adapter.rooms[name] || {}).length;
139139
}
140140

141141
};

0 commit comments

Comments
 (0)