Interesting... if the peer disconnects before the node object subscription completes, an NPE would fire... but could this have prevented a lock from being release. It doesn't seem likely since a lock probably can't be assigned until the subscription is complete anyway(?). But then again, maybe some information is passed prior to this. In any case, stop throwing an NPE here.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5723 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -193,13 +193,16 @@ public class PeerNode
|
||||
// documentation inherited from interface ClientObserver
|
||||
public void clientDidLogoff (Client client)
|
||||
{
|
||||
String nodeName = getNodeName();
|
||||
for (ClientInfo clinfo : nodeobj.clients) {
|
||||
_peermgr.clientLoggedOff(nodeName, clinfo);
|
||||
if (nodeobj != null) {
|
||||
String nodeName = getNodeName();
|
||||
for (ClientInfo clinfo : nodeobj.clients) {
|
||||
_peermgr.clientLoggedOff(nodeName, clinfo);
|
||||
}
|
||||
|
||||
nodeobj.removeListener(_listener);
|
||||
}
|
||||
|
||||
_peermgr.disconnectedFromPeer(this);
|
||||
nodeobj.removeListener(_listener);
|
||||
_listener = null;
|
||||
nodeobj = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user