Serialize the request early so that developers find out as soon as possible if
they're fucking up. Also fixed up a comment. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6135 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -485,7 +485,10 @@ public abstract class PeerManager
|
||||
return;
|
||||
}
|
||||
|
||||
// build a set of node names (including the local node) to
|
||||
// serialize the action to make sure we can
|
||||
byte[] requestBytes = flattenRequest(request);
|
||||
|
||||
// build a set of node names (including the local node) to which to send the request
|
||||
final Set<String> nodes = Sets.newHashSet();
|
||||
if (request.isApplicable(_nodeobj)) {
|
||||
nodes.add(_nodeobj.nodeName);
|
||||
@@ -495,15 +498,11 @@ public abstract class PeerManager
|
||||
nodes.add(peer.getNodeName());
|
||||
}
|
||||
}
|
||||
|
||||
if (nodes.isEmpty() && onDropped != null) {
|
||||
onDropped.run();
|
||||
return;
|
||||
}
|
||||
|
||||
// serialize the action to make sure we can
|
||||
byte[] requestBytes = flattenRequest(request);
|
||||
|
||||
for (final String node : nodes) {
|
||||
invokeNodeRequest(node, requestBytes, new InvocationService.ResultListener() {
|
||||
public void requestProcessed (Object result) {
|
||||
|
||||
Reference in New Issue
Block a user