Reverted back to the previous MessageEvent implementation that should perform better in most cases
This commit is contained in:
parent
3610fa9608
commit
2cf7816903
@ -61,7 +61,11 @@ public class DownstreamMessageEvent implements MessageEvent {
|
|||||||
this.channel = channel;
|
this.channel = channel;
|
||||||
this.future = future;
|
this.future = future;
|
||||||
this.message = message;
|
this.message = message;
|
||||||
|
if (remoteAddress != null) {
|
||||||
this.remoteAddress = remoteAddress;
|
this.remoteAddress = remoteAddress;
|
||||||
|
} else {
|
||||||
|
this.remoteAddress = channel.getRemoteAddress();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Channel getChannel() {
|
public Channel getChannel() {
|
||||||
@ -77,11 +81,7 @@ public class DownstreamMessageEvent implements MessageEvent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public SocketAddress getRemoteAddress() {
|
public SocketAddress getRemoteAddress() {
|
||||||
if (remoteAddress != null) {
|
|
||||||
return remoteAddress;
|
return remoteAddress;
|
||||||
} else {
|
|
||||||
return getChannel().getRemoteAddress();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -57,7 +57,11 @@ public class UpstreamMessageEvent implements MessageEvent {
|
|||||||
}
|
}
|
||||||
this.channel = channel;
|
this.channel = channel;
|
||||||
this.message = message;
|
this.message = message;
|
||||||
|
if (remoteAddress != null) {
|
||||||
this.remoteAddress = remoteAddress;
|
this.remoteAddress = remoteAddress;
|
||||||
|
} else {
|
||||||
|
this.remoteAddress = channel.getRemoteAddress();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Channel getChannel() {
|
public Channel getChannel() {
|
||||||
@ -73,11 +77,7 @@ public class UpstreamMessageEvent implements MessageEvent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public SocketAddress getRemoteAddress() {
|
public SocketAddress getRemoteAddress() {
|
||||||
if (remoteAddress != null) {
|
|
||||||
return remoteAddress;
|
return remoteAddress;
|
||||||
} else {
|
|
||||||
return getChannel().getRemoteAddress();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user