If we are asked to end a session after the omgr has shutdown, just log
something friendly and drop the request. The server is about to go away. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5545 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -372,7 +372,7 @@ public class PresentsSession
|
|||||||
// if our connection was closed while we were resolving our client object, then just
|
// if our connection was closed while we were resolving our client object, then just
|
||||||
// abandon ship
|
// abandon ship
|
||||||
if (getConnection() == null) {
|
if (getConnection() == null) {
|
||||||
log.info("Session ended before client object could be resolved: " + this + ".");
|
log.info("Session ended before client object could be resolved " + this + ".");
|
||||||
endSession();
|
endSession();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -500,7 +500,7 @@ public class PresentsSession
|
|||||||
// session
|
// session
|
||||||
if (_clobj == null) {
|
if (_clobj == null) {
|
||||||
log.info("Rapid-fire reconnect caused us to arrive in resumeSession() before the " +
|
log.info("Rapid-fire reconnect caused us to arrive in resumeSession() before the " +
|
||||||
"original session resolved its client object: " + this + ".");
|
"original session resolved its client object " + this + ".");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -522,7 +522,7 @@ public class PresentsSession
|
|||||||
{
|
{
|
||||||
// if we have no client object for whatever reason; we're hosed, shut ourselves down
|
// if we have no client object for whatever reason; we're hosed, shut ourselves down
|
||||||
if (_clobj == null) {
|
if (_clobj == null) {
|
||||||
log.info("Missing client object for resuming session. Killing session.");
|
log.info("Missing client object for resuming session " + this + ".");
|
||||||
endSession();
|
endSession();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -542,11 +542,15 @@ public class PresentsSession
|
|||||||
@AnyThread
|
@AnyThread
|
||||||
protected void safeEndSession ()
|
protected void safeEndSession ()
|
||||||
{
|
{
|
||||||
_omgr.postRunnable(new Runnable() {
|
if (!_omgr.isRunning()) {
|
||||||
public void run () {
|
log.info("Dropping end session request as we're shutting down " + this + ".");
|
||||||
endSession();
|
} else {
|
||||||
}
|
_omgr.postRunnable(new Runnable() {
|
||||||
});
|
public void run () {
|
||||||
|
endSession();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user