From ebd051e2e4546bfba0ed7412c46829bf1d5da0c4 Mon Sep 17 00:00:00 2001 From: RaphiMC <50594595+RaphiMC@users.noreply.github.com> Date: Tue, 24 Sep 2024 12:14:25 +0200 Subject: [PATCH] Improved legacy client passthrough Fixes issues with B2R plugin --- .../passthrough/LegacyPassthroughInitialHandler.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/raphimc/viaproxy/proxy/client2proxy/passthrough/LegacyPassthroughInitialHandler.java b/src/main/java/net/raphimc/viaproxy/proxy/client2proxy/passthrough/LegacyPassthroughInitialHandler.java index ecea74e..85002c9 100644 --- a/src/main/java/net/raphimc/viaproxy/proxy/client2proxy/passthrough/LegacyPassthroughInitialHandler.java +++ b/src/main/java/net/raphimc/viaproxy/proxy/client2proxy/passthrough/LegacyPassthroughInitialHandler.java @@ -46,9 +46,10 @@ public class LegacyPassthroughInitialHandler extends SimpleChannelInboundHandler final PassthroughClient2ProxyChannelInitializer channelInitializer = new PassthroughClient2ProxyChannelInitializer(handlerSupplier); ctx.channel().pipeline().addLast(channelInitializer); ctx.channel().pipeline().fireChannelActive(); + ctx.pipeline().fireChannelRead(msg.retain()); + } else { + ctx.fireChannelRead(msg.retain()); } - - ctx.pipeline().fireChannelRead(msg.retain()); } @Override