Execute clearClientInfo() in a transaction on NodeObject so that when derived
classes naturally remove extra crap from the NodeObject as a result of the client departing this node, it all goes out in a single event. Cross-server traffic-- go! git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5684 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -809,7 +809,15 @@ public abstract class PeerManager
|
|||||||
Name username = client.getCredentials().getUsername();
|
Name username = client.getCredentials().getUsername();
|
||||||
for (ClientInfo clinfo : _nodeobj.clients) {
|
for (ClientInfo clinfo : _nodeobj.clients) {
|
||||||
if (clinfo.username.equals(username)) {
|
if (clinfo.username.equals(username)) {
|
||||||
clearClientInfo(client, clinfo);
|
_nodeobj.startTransaction();
|
||||||
|
try {
|
||||||
|
// we clear our client info in a transaction so that derived classes can remove
|
||||||
|
// other things from the NodeObject and we'll send that out to all of our peers
|
||||||
|
// in a single compound event
|
||||||
|
clearClientInfo(client, clinfo);
|
||||||
|
} finally {
|
||||||
|
_nodeobj.commitTransaction();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user