Merge branch 'pr/10896'

This commit is contained in:
Lee Hinman 2015-05-28 12:32:22 -06:00
commit 5a73a16355
1 changed files with 6 additions and 2 deletions

View File

@ -28,7 +28,9 @@ import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.common.bytes.BytesArray;
import org.elasticsearch.common.bytes.BytesReference;
import org.elasticsearch.common.component.AbstractLifecycleComponent;
import org.elasticsearch.common.io.stream.*;
import org.elasticsearch.common.io.stream.BytesStreamOutput;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.network.MulticastChannel;
import org.elasticsearch.common.network.NetworkService;
import org.elasticsearch.common.settings.Settings;
@ -63,6 +65,8 @@ public class MulticastZenPing extends AbstractLifecycleComponent<ZenPing> implem
private static final byte[] INTERNAL_HEADER = new byte[]{1, 9, 8, 4};
private static final int PING_SIZE_ESTIMATE = 150;
private final String address;
private final int port;
private final String group;
@ -247,7 +251,7 @@ public class MulticastZenPing extends AbstractLifecycleComponent<ZenPing> implem
private void sendPingRequest(int id) {
try {
BytesStreamOutput out = new BytesStreamOutput();
BytesStreamOutput out = new BytesStreamOutput(PING_SIZE_ESTIMATE);
out.writeBytes(INTERNAL_HEADER);
// TODO: change to min_required version!
Version.writeVersion(version, out);