Be less harsh and just log a warning in case some shutdown methods rely on posted events or messages being silently ignored (invoker still throws however, because it was throwing before)
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5492 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -202,7 +202,7 @@ public class PresentsDObjectMgr
|
|||||||
public void postEvent (DEvent event)
|
public void postEvent (DEvent event)
|
||||||
{
|
{
|
||||||
if (!_running) {
|
if (!_running) {
|
||||||
throw new IllegalStateException("Object manager has been shutdown");
|
log.warning("Posting message to inactive object manager", new Exception());
|
||||||
}
|
}
|
||||||
|
|
||||||
// assign the event's id and append it to the queue
|
// assign the event's id and append it to the queue
|
||||||
@@ -278,7 +278,7 @@ public class PresentsDObjectMgr
|
|||||||
public void postRunnable (Runnable unit)
|
public void postRunnable (Runnable unit)
|
||||||
{
|
{
|
||||||
if (!_running) {
|
if (!_running) {
|
||||||
throw new IllegalStateException("Object manager has been shutdown");
|
log.warning("Posting runnable to inactive object manager", new Exception());
|
||||||
}
|
}
|
||||||
|
|
||||||
// just append it to the queue
|
// just append it to the queue
|
||||||
|
|||||||
@@ -857,7 +857,7 @@ public class ConnectionManager extends LoopingThread
|
|||||||
void postMessage (Connection conn, DownstreamMessage msg)
|
void postMessage (Connection conn, DownstreamMessage msg)
|
||||||
{
|
{
|
||||||
if (!isRunning()) {
|
if (!isRunning()) {
|
||||||
throw new IllegalStateException("Connection manager has been shutdown");
|
log.warning("Posting message to inactive connection manager", new Exception());
|
||||||
}
|
}
|
||||||
|
|
||||||
// sanity check
|
// sanity check
|
||||||
|
|||||||
Reference in New Issue
Block a user