Archive update 0.53.1

This commit is contained in:
Tschrock
2019-09-02 11:37:22 -04:00
parent 715dfb8aeb
commit ac640dbe1a
32 changed files with 212 additions and 248 deletions
+4 -1
View File
@@ -57,6 +57,8 @@ interface ReservedID {
time: number;
}
const MAP_SOFT_LIMIT = 10000;
export class World {
season = Season.Summer;
holiday = Holiday.None;
@@ -488,7 +490,8 @@ export class World {
timingEnd();
timingStart('cleanup unused maps');
const mapDiscardThreshold = now - MAP_DISCARD_TIMEOUT;
const discardTimeout = this.maps.length > MAP_SOFT_LIMIT ? 5 * MINUTE : MAP_DISCARD_TIMEOUT;
const mapDiscardThreshold = now - discardTimeout;
for (const map of this.maps) {
if (map.instance && (hasAnyClients(map) || this.mapSwitchQueue.some(q => q.map === map))) {