mirror of
https://github.com/AndrioCelos/TableturfBattleApp.git
synced 2026-08-21 10:24:00 -05:00
Track inactive games and add a command to lock the server for updates
A game that has had no activity for 5 minutes is considered inactive. There can be a limited number of inactive games before they are deleted. A console command is added that will wait for all games to become inactive before stopping the server, and prevent starting new games.
This commit is contained in:
@@ -47,7 +47,9 @@ preGameForm.addEventListener('submit', e => {
|
||||
setGameUrl(response.gameID);
|
||||
|
||||
getGameInfo(response.gameID, 0);
|
||||
} else
|
||||
} else if (request.status == 503)
|
||||
communicationError('The server is temporarily locked for an update. Please try again soon.', true, () => setLoadingMessage(null));
|
||||
else
|
||||
communicationError('Unable to create the room.', true, () => setLoadingMessage(null));
|
||||
});
|
||||
request.addEventListener('error', () => {
|
||||
|
||||
Reference in New Issue
Block a user