mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-24 03:05:49 +01:00
#3073: Release HAProxyMessage after read
This commit is contained in:
parent
830ee8f27d
commit
ac371bb596
@ -81,14 +81,20 @@ public class HandlerBoss extends ChannelInboundHandlerAdapter
|
|||||||
if ( msg instanceof HAProxyMessage )
|
if ( msg instanceof HAProxyMessage )
|
||||||
{
|
{
|
||||||
HAProxyMessage proxy = (HAProxyMessage) msg;
|
HAProxyMessage proxy = (HAProxyMessage) msg;
|
||||||
InetSocketAddress newAddress = new InetSocketAddress( proxy.sourceAddress(), proxy.sourcePort() );
|
try
|
||||||
|
|
||||||
ProxyServer.getInstance().getLogger().log( Level.FINE, "Set remote address via PROXY {0} -> {1}", new Object[]
|
|
||||||
{
|
{
|
||||||
channel.getRemoteAddress(), newAddress
|
InetSocketAddress newAddress = new InetSocketAddress( proxy.sourceAddress(), proxy.sourcePort() );
|
||||||
} );
|
|
||||||
|
|
||||||
channel.setRemoteAddress( newAddress );
|
ProxyServer.getInstance().getLogger().log( Level.FINE, "Set remote address via PROXY {0} -> {1}", new Object[]
|
||||||
|
{
|
||||||
|
channel.getRemoteAddress(), newAddress
|
||||||
|
} );
|
||||||
|
|
||||||
|
channel.setRemoteAddress( newAddress );
|
||||||
|
} finally
|
||||||
|
{
|
||||||
|
proxy.release();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user