The PeerNode is the thing that calls clientLoggedOn/Off on the PeerManager,

so let's keep with that pattern for any clients there when the
peer itself connects or disconnects.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5713 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2009-04-10 22:25:35 +00:00
parent 7f97d41fd5
commit 18d36176a3
2 changed files with 12 additions and 14 deletions
@@ -195,6 +195,11 @@ 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);
}
_peermgr.disconnectedFromPeer(this);
nodeobj.removeListener(_listener);
_listener = null;
@@ -215,6 +220,11 @@ public class PeerNode
nodeobj.addListener(_listener = createListener());
_peermgr.connectedToPeer(this);
String nodeName = getNodeName();
for (ClientInfo clinfo : nodeobj.clients) {
_peermgr.clientLoggedOn(nodeName, clinfo);
}
}
// documentation inherited from interface Subscriber