Prevent calling observers with a null client
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5538 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -211,9 +211,10 @@ public class BlockingCommunicator extends Communicator
|
||||
log.info("Connection failed", ioe);
|
||||
|
||||
// let the client know that things went south
|
||||
final Client client = _client;
|
||||
notifyClientObservers(new ObserverOps.Client() {
|
||||
protected void notify (ClientObserver obs) {
|
||||
obs.clientConnectionFailed(_client, ioe);
|
||||
obs.clientConnectionFailed(client, ioe);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -267,9 +268,10 @@ public class BlockingCommunicator extends Communicator
|
||||
log.debug("Writer thread exited.");
|
||||
|
||||
// let the client observers know that we're logged off
|
||||
final Client client = _client;
|
||||
notifyClientObservers(new ObserverOps.Session() {
|
||||
protected void notify (SessionObserver obs) {
|
||||
obs.clientDidLogoff(_client);
|
||||
obs.clientDidLogoff(client);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user