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.future = future;
|
||||
this.message = message;
|
||||
this.remoteAddress = remoteAddress;
|
||||
if (remoteAddress != null) {
|
||||
this.remoteAddress = remoteAddress;
|
||||
} else {
|
||||
this.remoteAddress = channel.getRemoteAddress();
|
||||
}
|
||||
}
|
||||
|
||||
public Channel getChannel() {
|
||||
@ -77,11 +81,7 @@ public class DownstreamMessageEvent implements MessageEvent {
|
||||
}
|
||||
|
||||
public SocketAddress getRemoteAddress() {
|
||||
if (remoteAddress != null) {
|
||||
return remoteAddress;
|
||||
} else {
|
||||
return getChannel().getRemoteAddress();
|
||||
}
|
||||
return remoteAddress;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -57,7 +57,11 @@ public class UpstreamMessageEvent implements MessageEvent {
|
||||
}
|
||||
this.channel = channel;
|
||||
this.message = message;
|
||||
this.remoteAddress = remoteAddress;
|
||||
if (remoteAddress != null) {
|
||||
this.remoteAddress = remoteAddress;
|
||||
} else {
|
||||
this.remoteAddress = channel.getRemoteAddress();
|
||||
}
|
||||
}
|
||||
|
||||
public Channel getChannel() {
|
||||
@ -73,11 +77,7 @@ public class UpstreamMessageEvent implements MessageEvent {
|
||||
}
|
||||
|
||||
public SocketAddress getRemoteAddress() {
|
||||
if (remoteAddress != null) {
|
||||
return remoteAddress;
|
||||
} else {
|
||||
return getChannel().getRemoteAddress();
|
||||
}
|
||||
return remoteAddress;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user