When a place is loaded, immediately schedule an unload in the future, if

applicable, as it will only otherwise get checked when users leave the place.
It's possible that we'll load and nobody will ever enter.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3763 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2005-11-17 03:29:24 +00:00
parent 91aacbf8a8
commit 38ee3ae362
@@ -267,6 +267,9 @@ public class PlaceManager
// let our derived classes do their thang
didStartup();
// since we start empty, we need to immediately assume shutdown
checkShutdownInterval();
}
/**
@@ -499,6 +502,14 @@ public class PlaceManager
// Log.info("Place became empty " + where() + ".");
checkShutdownInterval();
}
/**
* Called on startup and when the place is empty.
*/
protected void checkShutdownInterval ()
{
// queue up a shutdown interval
long idlePeriod = idleUnloadPeriod();
if (idlePeriod > 0L) {