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);
|
log.info("Connection failed", ioe);
|
||||||
|
|
||||||
// let the client know that things went south
|
// let the client know that things went south
|
||||||
|
final Client client = _client;
|
||||||
notifyClientObservers(new ObserverOps.Client() {
|
notifyClientObservers(new ObserverOps.Client() {
|
||||||
protected void notify (ClientObserver obs) {
|
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.");
|
log.debug("Writer thread exited.");
|
||||||
|
|
||||||
// let the client observers know that we're logged off
|
// let the client observers know that we're logged off
|
||||||
|
final Client client = _client;
|
||||||
notifyClientObservers(new ObserverOps.Session() {
|
notifyClientObservers(new ObserverOps.Session() {
|
||||||
protected void notify (SessionObserver obs) {
|
protected void notify (SessionObserver obs) {
|
||||||
obs.clientDidLogoff(_client);
|
obs.clientDidLogoff(client);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user