mirror of
https://github.com/jlengrand/vert.x.git
synced 2026-03-10 08:51:19 +00:00
Reply address is never set in MessageImpl constructor
This commit is contained in:
@@ -235,7 +235,7 @@ public class EventBusImpl implements EventBus, MetricsProvider {
|
||||
Objects.requireNonNull(address, "no null address accepted");
|
||||
MessageCodec codec = codecManager.lookupCodec(body, codecName);
|
||||
@SuppressWarnings("unchecked")
|
||||
MessageImpl msg = new MessageImpl(address, null, headers, body, codec, send, src, this);
|
||||
MessageImpl msg = new MessageImpl(address, headers, body, codec, send, src, this);
|
||||
return msg;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,12 +43,11 @@ public class MessageImpl<U, V> implements Message<V> {
|
||||
this.src = src;
|
||||
}
|
||||
|
||||
public MessageImpl(String address, String replyAddress, MultiMap headers, U sentBody,
|
||||
public MessageImpl(String address, MultiMap headers, U sentBody,
|
||||
MessageCodec<U, V> messageCodec,
|
||||
boolean send, boolean src, EventBusImpl bus) {
|
||||
this.messageCodec = messageCodec;
|
||||
this.address = address;
|
||||
this.replyAddress = replyAddress;
|
||||
this.headers = headers;
|
||||
this.sentBody = sentBody;
|
||||
this.send = send;
|
||||
|
||||
@@ -178,7 +178,7 @@ public class ClusteredEventBus extends EventBusImpl {
|
||||
Objects.requireNonNull(address, "no null address accepted");
|
||||
MessageCodec codec = codecManager.lookupCodec(body, codecName);
|
||||
@SuppressWarnings("unchecked")
|
||||
ClusteredMessage msg = new ClusteredMessage(serverID, address, null, headers, body, codec, send, src, this);
|
||||
ClusteredMessage msg = new ClusteredMessage(serverID, address, headers, body, codec, send, src, this);
|
||||
return msg;
|
||||
}
|
||||
|
||||
|
||||
@@ -46,9 +46,9 @@ public class ClusteredMessage<U, V> extends MessageImpl<U, V> {
|
||||
super(src, bus);
|
||||
}
|
||||
|
||||
public ClusteredMessage(ServerID sender, String address, String replyAddress, MultiMap headers, U sentBody,
|
||||
public ClusteredMessage(ServerID sender, String address, MultiMap headers, U sentBody,
|
||||
MessageCodec<U, V> messageCodec, boolean send, boolean src, EventBusImpl bus) {
|
||||
super(address, replyAddress, headers, sentBody, messageCodec, send, src, bus);
|
||||
super(address, headers, sentBody, messageCodec, send, src, bus);
|
||||
this.sender = sender;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,9 +11,6 @@
|
||||
|
||||
package io.vertx.core.eventbus.impl.clustered;
|
||||
|
||||
import io.vertx.core.AsyncResult;
|
||||
import io.vertx.core.Future;
|
||||
import io.vertx.core.Handler;
|
||||
import io.vertx.core.Vertx;
|
||||
import io.vertx.core.buffer.Buffer;
|
||||
import io.vertx.core.eventbus.EventBusOptions;
|
||||
@@ -139,7 +136,7 @@ class ConnectionHolder {
|
||||
close();
|
||||
});
|
||||
ClusteredMessage pingMessage =
|
||||
new ClusteredMessage<>(serverID, PING_ADDRESS, null, null, null, new PingMessageCodec(), true, true, eventBus);
|
||||
new ClusteredMessage<>(serverID, PING_ADDRESS, null, null, new PingMessageCodec(), true, true, eventBus);
|
||||
Buffer data = pingMessage.encodeToWire();
|
||||
socket.write(data);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user