Skip to content

Commit

Permalink
Fix the active user count
Browse files Browse the repository at this point in the history
  • Loading branch information
fatfisz committed May 26, 2020
1 parent d6aa25f commit bb39483
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/State.ts
Expand Up @@ -189,7 +189,10 @@ export class State {
}

private getActiveUserCount() {
return this.sessions.size;
return [...this.sessions.values()].reduce(
(activeUserCount, session) => activeUserCount + (session.socket ? 1 : 0),
0
);
}
}

Expand Down

0 comments on commit bb39483

Please sign in to comment.