Skip to content

Commit

Permalink
fix: add timeout 5s for endGame (#339)
Browse files Browse the repository at this point in the history
  • Loading branch information
catHD authored Oct 31, 2024
1 parent 27f59d2 commit 0f5a4ec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/arena/GameService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,11 @@ export default class GameService {
endGame(): void {
console.log('GC debug:: endGame', this.info.id);
// Отправляем статистику
setTimeout(() => {
this.sendToAll(this.endGameReason);
this.sendToAll(this.statistic());
this.saveGame();
},5000)
setTimeout(() => {
this.sendToAll('Конец игры, распределяем ресурсы...');
this.forAllPlayers(channelHelper.sendExitButton);
Expand Down

0 comments on commit 0f5a4ec

Please sign in to comment.