From 3931f4bfac5c4061dfd4bcb3119162d9e95d5e96 Mon Sep 17 00:00:00 2001 From: linsaftw Date: Fri, 30 Apr 2021 19:01:28 -0300 Subject: [PATCH] Fix patch 0024 --- .../0024-Fix-ByteBuf-memory-leaks.patch | 43 ------------------- 1 file changed, 43 deletions(-) diff --git a/Waterfall-Proxy-Patches/0024-Fix-ByteBuf-memory-leaks.patch b/Waterfall-Proxy-Patches/0024-Fix-ByteBuf-memory-leaks.patch index fd37918..f0856e0 100644 --- a/Waterfall-Proxy-Patches/0024-Fix-ByteBuf-memory-leaks.patch +++ b/Waterfall-Proxy-Patches/0024-Fix-ByteBuf-memory-leaks.patch @@ -167,49 +167,6 @@ index cefa0206..2cd5740c 100644 } return modTags; } -diff --git a/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java b/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java -index 46e338ca..048ac826 100644 ---- a/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java -+++ b/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java -@@ -100,23 +100,32 @@ public class HandlerBoss extends ChannelInboundHandlerAdapter - if ( msg instanceof HAProxyMessage ) - { - HAProxyMessage proxy = (HAProxyMessage) msg; -- InetSocketAddress newAddress = new InetSocketAddress( proxy.sourceAddress(), proxy.sourcePort() ); - -- ProxyServer.getInstance().getLogger().log( Level.FINE, "Set remote address via PROXY {0} -> {1}", new Object[] -+ try - { -- channel.getRemoteAddress(), newAddress -- } ); -+ InetSocketAddress newAddress = new InetSocketAddress( proxy.sourceAddress(), proxy.sourcePort() ); -+ -+ ProxyServer.getInstance().getLogger().log( Level.FINE, "Set remote address via PROXY {0} -> {1}", new Object[] -+ { -+ channel.getRemoteAddress(), newAddress -+ } ); - -- channel.setRemoteAddress( newAddress ); -+ channel.setRemoteAddress( newAddress ); -+ } finally -+ { -+ proxy.release(); -+ } - return; - } - - if ( handler != null ) - { - PacketWrapper packet = (PacketWrapper) msg; -- boolean sendPacket = handler.shouldHandle( packet ); -+ - try - { -+ boolean sendPacket = handler.shouldHandle( packet ); -+ - if ( sendPacket && packet.packet != null ) - { - try -- 2.31.0.windows.1