From 38ee3ae36294213c1bfbaf2247e53cb6aa0fc074 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Thu, 17 Nov 2005 03:29:24 +0000 Subject: [PATCH] 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 --- .../com/threerings/crowd/server/PlaceManager.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/java/com/threerings/crowd/server/PlaceManager.java b/src/java/com/threerings/crowd/server/PlaceManager.java index a9b4009e2..02d968d4d 100644 --- a/src/java/com/threerings/crowd/server/PlaceManager.java +++ b/src/java/com/threerings/crowd/server/PlaceManager.java @@ -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) {