From 91b416f18ea70716808f2049875d5f3dcff039e6 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Sat, 10 Nov 2007 05:27:17 +0000 Subject: [PATCH] Cancel our no-show interval once the game starts so that if it expires after an EZGame has finished it doesn't think that it's still pre-game and that it should actually cancel the game. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@490 c613c5cb-e716-0410-b11b-feb51c14d237 --- .../threerings/parlor/game/server/GameManager.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/java/com/threerings/parlor/game/server/GameManager.java b/src/java/com/threerings/parlor/game/server/GameManager.java index 55231cf1..7d288f6e 100644 --- a/src/java/com/threerings/parlor/game/server/GameManager.java +++ b/src/java/com/threerings/parlor/game/server/GameManager.java @@ -798,11 +798,12 @@ public class GameManager extends PlaceManager // start up a no-show timer if needed if (needsNoShowTimer()) { - new Interval(CrowdServer.omgr) { + _noShowInterval = new Interval(CrowdServer.omgr) { public void expired () { checkForNoShows(); } - }.schedule(NOSHOW_DELAY); + }; + _noShowInterval.schedule(NOSHOW_DELAY); } } @@ -1012,6 +1013,9 @@ public class GameManager extends PlaceManager */ protected void gameDidStart () { + // clear out our no-show timer if it's still running + _noShowInterval.cancel(); + // let our delegates do their business applyToDelegates(new DelegateOp() { public void apply (PlaceManagerDelegate delegate) { @@ -1312,6 +1316,9 @@ public class GameManager extends PlaceManager /** TEMP: debugging the pending rating double release bug. */ protected RepeatCallTracker _gameEndTracker = new RepeatCallTracker(); + /** The interval used to check for no-shows. */ + protected Interval _noShowInterval; + /** Whether we have already postponed the start of the game. */ protected boolean _postponedStart = false;