From e2233b61c943092d3d7c20d9196aa36c7f6da5da Mon Sep 17 00:00:00 2001 From: SamTV12345 <40429738+SamTV12345@users.noreply.github.com> Date: Thu, 18 Apr 2024 22:42:36 +0200 Subject: [PATCH] Fixed totalUsers being undefined thus not being displayed. (#6342) --- src/node/handler/PadMessageHandler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node/handler/PadMessageHandler.ts b/src/node/handler/PadMessageHandler.ts index fc454ee14f3..2ed40391c8b 100644 --- a/src/node/handler/PadMessageHandler.ts +++ b/src/node/handler/PadMessageHandler.ts @@ -88,7 +88,7 @@ exports.socketio = () => { const sessioninfos:MapArrayType = {}; 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)) {