mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-09-30 21:29:19 -05:00
Rooms: Prevent expiry of Bo3 parent rooms
Apparently some games last long enough that the parent rooms will expire due to the 15 minute limitation, terminating the child games as well. So we're just going to prevent those from expiring while child games exist. If they're truly inactive, they'll get hit once the child games expire.
This commit is contained in:
@@ -676,6 +676,12 @@ export abstract class BasicRoom {
|
||||
}
|
||||
}
|
||||
expire() {
|
||||
const game = this.getGame(BestOfGame);
|
||||
// do not expire parent room until children expire
|
||||
if (game?.games.length) {
|
||||
this.pokeExpireTimer();
|
||||
return;
|
||||
}
|
||||
this.send('|expire|');
|
||||
this.destroy();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user