Skip to content

Commit

Permalink
Send server restart notification for listening sesions too
Browse files Browse the repository at this point in the history
  • Loading branch information
Brainicism committed Dec 9, 2023
1 parent bb99cc0 commit 3560df5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/helpers/management_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ export async function warnServersImpendingRestart(
): Promise<void> {
let serversWarned = 0;
if (RESTART_WARNING_INTERVALS.has(timeUntilRestart)) {
for (const gameSession of Object.values(State.gameSessions)) {
for (const gameSession of [
...Object.values(State.gameSessions),
...Object.values(State.listeningSessions),
]) {
if (gameSession.finished) continue;
// eslint-disable-next-line no-await-in-loop
await sendInfoMessage(
Expand Down

0 comments on commit 3560df5

Please sign in to comment.