[FIX] Исправление записи сообщения NettyIpForwardHandler

This commit is contained in:
Gravit 2019-05-09 21:25:35 +07:00
parent 09cae122d1
commit 0e3a5619f9
No known key found for this signature in database
GPG key ID: 061981E1E85D3216

View file

@ -19,7 +19,11 @@ public NettyIpForwardHandler(NettyConnectContext context) {
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
//super.channelRead(ctx, msg);
if(context.ip != null) return;
if(context.ip != null)
{
ctx.write(msg);
return;
}
if(msg instanceof HttpRequest)
{
HttpRequest http = (HttpRequest) msg;
@ -40,5 +44,6 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception
else LogHelper.error("IpForwarding error. Headers not found");
}
else LogHelper.error("IpForwarding error. Real message class %s", msg.getClass().getName());
ctx.write(msg);
}
}