#3073: Release HAProxyMessage after read
This commit is contained in:
parent
830ee8f27d
commit
ac371bb596
@ -81,6 +81,8 @@ public class HandlerBoss extends ChannelInboundHandlerAdapter
|
||||
if ( msg instanceof HAProxyMessage )
|
||||
{
|
||||
HAProxyMessage proxy = (HAProxyMessage) msg;
|
||||
try
|
||||
{
|
||||
InetSocketAddress newAddress = new InetSocketAddress( proxy.sourceAddress(), proxy.sourcePort() );
|
||||
|
||||
ProxyServer.getInstance().getLogger().log( Level.FINE, "Set remote address via PROXY {0} -> {1}", new Object[]
|
||||
@ -89,6 +91,10 @@ public class HandlerBoss extends ChannelInboundHandlerAdapter
|
||||
} );
|
||||
|
||||
channel.setRemoteAddress( newAddress );
|
||||
} finally
|
||||
{
|
||||
proxy.release();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user