From ee8eda46bbdc9dce0055a5e8196d6c301c72d115 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Thu, 5 Dec 2002 16:39:21 +0000 Subject: [PATCH] Have to check that the user exists in sessionConnectionClosed() before setting their status to disconnected; don't have to check that the user exists in sessionDidEnd(). git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2028 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../threerings/crowd/server/CrowdClient.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/java/com/threerings/crowd/server/CrowdClient.java b/src/java/com/threerings/crowd/server/CrowdClient.java index 0a08571d3..b3b12bd05 100644 --- a/src/java/com/threerings/crowd/server/CrowdClient.java +++ b/src/java/com/threerings/crowd/server/CrowdClient.java @@ -1,5 +1,5 @@ // -// $Id: CrowdClient.java,v 1.20 2002/12/04 02:47:03 mdb Exp $ +// $Id: CrowdClient.java,v 1.21 2002/12/05 16:39:21 mdb Exp $ package com.threerings.crowd.server; @@ -19,14 +19,16 @@ import com.threerings.crowd.server.CrowdServer; public class CrowdClient extends PresentsClient { // documentation inherited - protected void sessionConnectionClosed (ClientObject clobj) + protected void sessionConnectionClosed () { - super.sessionConnectionClosed(clobj); + super.sessionConnectionClosed(); - // note that the user's disconnected - BodyObject bobj = (BodyObject)clobj; - BodyProvider.updateOccupantStatus( - bobj, bobj.location, OccupantInfo.DISCONNECTED); + if (_clobj != null) { + // note that the user is disconnected + BodyObject bobj = (BodyObject)_clobj; + BodyProvider.updateOccupantStatus( + bobj, bobj.location, OccupantInfo.DISCONNECTED); + } } // documentation inherited @@ -43,13 +45,11 @@ public class CrowdClient extends PresentsClient // documentation inherited protected void sessionDidEnd () { + super.sessionDidEnd(); + // clear out our location so that anyone listening for such things // will know that we've left - if (_clobj != null) { - clearLocation((BodyObject)_clobj); - } - - super.sessionDidEnd(); + clearLocation((BodyObject)_clobj); } /**