Fixed totalUsers being undefined thus not being displayed. (#6342)

This commit is contained in:
SamTV12345 2024-04-18 22:42:36 +02:00 committed by GitHub
parent 950ed74071
commit e2233b61c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -88,7 +88,7 @@ exports.socketio = () => {
const sessioninfos:MapArrayType<any> = {};
exports.sessioninfos = sessioninfos;
stats.gauge('totalUsers', () => socketio ? socketio.sockets.size : 0);
stats.gauge('totalUsers', () => socketio ? socketio.engine.clientsCount : 0);
stats.gauge('activePads', () => {
const padIds = new Set();
for (const {padId} of Object.values(sessioninfos)) {