Let's not freak out if our caller disappears while we're off resolving a
scene. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2834 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: SceneProvider.java,v 1.17 2003/06/11 02:48:07 mdb Exp $
|
// $Id: SceneProvider.java,v 1.18 2003/10/25 00:10:35 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.whirled.server;
|
package com.threerings.whirled.server;
|
||||||
|
|
||||||
@@ -46,17 +46,22 @@ public class SceneProvider
|
|||||||
|
|
||||||
// create a callback object that will handle the resolution or
|
// create a callback object that will handle the resolution or
|
||||||
// failed resolution of the scene
|
// failed resolution of the scene
|
||||||
SceneRegistry.ResolutionListener rl =
|
SceneRegistry.ResolutionListener rl = null;
|
||||||
new SceneRegistry.ResolutionListener()
|
rl = new SceneRegistry.ResolutionListener() {
|
||||||
{
|
public void sceneWasResolved (SceneManager scmgr) {
|
||||||
public void sceneWasResolved (SceneManager scmgr)
|
// make sure our caller is still around; under heavy load,
|
||||||
{
|
// clients might end their session while the scene is
|
||||||
|
// resolving
|
||||||
|
if (!source.isActive()) {
|
||||||
|
Log.info("Abandoning scene move, client gone " +
|
||||||
|
"[who=" + source.who() +
|
||||||
|
", dest=" + scmgr.where() + "].");
|
||||||
|
return;
|
||||||
|
}
|
||||||
finishMoveToRequest(source, scmgr, sceneVer, listener);
|
finishMoveToRequest(source, scmgr, sceneVer, listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sceneFailedToResolve (
|
public void sceneFailedToResolve (int rsceneId, Exception reason) {
|
||||||
int rsceneId, Exception reason)
|
|
||||||
{
|
|
||||||
Log.warning("Unable to resolve scene [sceneid=" + rsceneId +
|
Log.warning("Unable to resolve scene [sceneid=" + rsceneId +
|
||||||
", reason=" + reason + "].");
|
", reason=" + reason + "].");
|
||||||
// pretend like the scene doesn't exist to the client
|
// pretend like the scene doesn't exist to the client
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: SpotProvider.java,v 1.20 2003/08/13 00:11:03 mdb Exp $
|
// $Id: SpotProvider.java,v 1.21 2003/10/25 00:10:35 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.whirled.spot.server;
|
package com.threerings.whirled.spot.server;
|
||||||
|
|
||||||
@@ -108,6 +108,16 @@ public class SpotProvider
|
|||||||
SceneRegistry.ResolutionListener rl =
|
SceneRegistry.ResolutionListener rl =
|
||||||
new SceneRegistry.ResolutionListener() {
|
new SceneRegistry.ResolutionListener() {
|
||||||
public void sceneWasResolved (SceneManager scmgr) {
|
public void sceneWasResolved (SceneManager scmgr) {
|
||||||
|
// make sure our caller is still around; under heavy
|
||||||
|
// load, clients might end their session while the
|
||||||
|
// scene is resolving
|
||||||
|
if (!fsource.isActive()) {
|
||||||
|
Log.info("Abandoning portal traversal, client gone " +
|
||||||
|
"[who=" + fsource.who() +
|
||||||
|
", dest=" + scmgr.where() + "].");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// let the source manager know that this guy is
|
// let the source manager know that this guy is
|
||||||
// departing via the specified portal
|
// departing via the specified portal
|
||||||
srcmgr.willTraversePortal(fsource, fdest);
|
srcmgr.willTraversePortal(fsource, fdest);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: ZoneProvider.java,v 1.15 2003/06/11 02:48:07 mdb Exp $
|
// $Id: ZoneProvider.java,v 1.16 2003/10/25 00:10:35 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.whirled.zone.server;
|
package com.threerings.whirled.zone.server;
|
||||||
|
|
||||||
@@ -115,10 +115,18 @@ public class ZoneProvider
|
|||||||
|
|
||||||
// create a callback object that will handle the resolution or
|
// create a callback object that will handle the resolution or
|
||||||
// failed resolution of the scene
|
// failed resolution of the scene
|
||||||
SceneRegistry.ResolutionListener rl =
|
SceneRegistry.ResolutionListener rl = null;
|
||||||
new SceneRegistry.ResolutionListener()
|
rl = new SceneRegistry.ResolutionListener() {
|
||||||
{
|
|
||||||
public void sceneWasResolved (SceneManager scmgr) {
|
public void sceneWasResolved (SceneManager scmgr) {
|
||||||
|
// make sure our caller is still around; under heavy load,
|
||||||
|
// clients might end their session while the scene is
|
||||||
|
// resolving
|
||||||
|
if (!fsource.isActive()) {
|
||||||
|
Log.info("Abandoning zone move, client gone " +
|
||||||
|
"[who=" + fsource.who() +
|
||||||
|
", dest=" + scmgr.where() + "].");
|
||||||
|
return;
|
||||||
|
}
|
||||||
finishMoveTo(fsource, fsum, scmgr, fsceneVer, flistener);
|
finishMoveTo(fsource, fsum, scmgr, fsceneVer, flistener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user