diff --git a/src/java/com/threerings/presents/server/net/ConnectionManager.java b/src/java/com/threerings/presents/server/net/ConnectionManager.java index b456a6cea..c65944c9c 100644 --- a/src/java/com/threerings/presents/server/net/ConnectionManager.java +++ b/src/java/com/threerings/presents/server/net/ConnectionManager.java @@ -122,17 +122,6 @@ public class ConnectionManager extends LoopingThread _lastStats = new ConMgrStats(); } - /** - * Configures the connection manager with an entity that will be informed of the success or - * failure of the connection manager initialization process. Note: the callback - * methods will be called on the connection manager thread, so be careful not to do anything on - * those methods that will conflict with activities on the dobjmgr thread, etc. - */ - public void setStartupListener (ResultListener rl) - { - _startlist = rl; - } - /** * Adds an authenticator to the authentication chain. This authenticator will be offered a * chance to authenticate incoming connections in lieu of the main autuenticator. @@ -437,9 +426,8 @@ public class ConnectionManager extends LoopingThread // if we failed to listen on at least one port, give up the ghost if (successes == 0) { - if (_startlist != null) { - _startlist.requestFailed(failure); - } + log.warning("ConnectionManager failed to bind to any ports. Shutting down."); + _shutmgr.queueShutdown(); return; } @@ -460,11 +448,6 @@ public class ConnectionManager extends LoopingThread port + "'.", ioe); } } - - // notify our startup listener, if we have one - if (_startlist != null) { - _startlist.requestCompleted(null); - } } /** Helper function for {@link #willStart}. */ @@ -1230,7 +1213,6 @@ public class ConnectionManager extends LoopingThread protected Selector _selector; protected ServerSocketChannel _ssocket; protected DatagramChannel _datagramChannel; - protected ResultListener _startlist; /** Counts consecutive runtime errors in select(). */ protected int _runtimeExceptionCount; @@ -1268,11 +1250,10 @@ public class ConnectionManager extends LoopingThread /** A runnable to execute when the connection manager thread exits. */ protected volatile Runnable _onExit; - /** The invoker on which we do our authenticating. */ + // some dependencies @Inject @AuthInvoker protected Invoker _authInvoker; - - /** The distributed object manager with which we operate. */ @Inject protected PresentsDObjectMgr _omgr; + @Inject protected ShutdownManager _shutmgr; /** How long we wait for network events before checking our running flag to see if we should * still be running. We don't want to loop too tightly, but we need to make sure we don't sit