Skip to content

Commit

Permalink
fix: Game Status becomes Abandoned eventually
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruchir28 committed May 2, 2024
1 parent e97667a commit 830101c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions apps/ws/src/Game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,13 @@ export class Game {
},
}),
);
// clear timers
this.clearTimer();
this.clearMoveTimer();
}

clearMoveTimer() {
if(this.moveTimer) clearTimeout(this.moveTimer);
}

setTimer(timer: NodeJS.Timeout) {
Expand Down

0 comments on commit 830101c

Please sign in to comment.