Stop trying to flush clients after the server shuts down

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5633 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Jamie Doornbos
2009-01-14 23:28:16 +00:00
parent a99489e650
commit 44a4981d27
@@ -105,12 +105,13 @@ public class ClientManager
// start up an interval that will check for expired clients and flush them from the bowels
// of the server
new Interval(omgr) {
_flushClients = new Interval(omgr) {
@Override
public void expired () {
flushClients();
}
}.schedule(CLIENT_FLUSH_INTERVAL, true);
};
_flushClients.schedule(CLIENT_FLUSH_INTERVAL, true);
}
/**
@@ -127,6 +128,8 @@ public class ClientManager
{
log.info("Client manager shutting down [ccount=" + _usermap.size() + "].");
_flushClients.cancel();
// inform all of our clients that they are being shut down
synchronized (_usermap) {
for (PresentsSession pc : _usermap.values()) {
@@ -573,6 +576,9 @@ public class ClientManager
/** Tracks registered {@link ClientObserver}s. */
protected ObserverList<ClientObserver> _clobservers = ObserverList.newSafeInOrder();
/** Interval to flush expired clients. */
protected Interval _flushClients;
// our injected dependencies
@Inject protected PresentsDObjectMgr _omgr;