Waterfall/Waterfall-Proxy-Patches/0034-Dont-frame-unreadable-connections.patch
2022-08-05 16:46:10 -03:00

23 lines
1.0 KiB
Diff

From 5cb2ccdb33cc1e380a97f2042bd5d50da8718665 Mon Sep 17 00:00:00 2001
From: xIsm4 <minelatinsoporte@gmail.com>
Date: Thu, 4 Aug 2022 23:27:43 +0200
Subject: [PATCH] Dont frame unreadable connections
diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/MinecraftDecoder.java b/protocol/src/main/java/net/md_5/bungee/protocol/MinecraftDecoder.java
index 074d2437..e248daee 100644
--- a/protocol/src/main/java/net/md_5/bungee/protocol/MinecraftDecoder.java
+++ b/protocol/src/main/java/net/md_5/bungee/protocol/MinecraftDecoder.java
@@ -33,7 +33,7 @@ public class MinecraftDecoder extends MessageToMessageDecoder<ByteBuf>
{
// See Varint21FrameDecoder for the general reasoning. We add this here as ByteToMessageDecoder#handlerRemoved()
// will fire any cumulated data through the pipeline, so we want to try and stop it here.
- if ( !ctx.channel().isActive() )
+ if ( !ctx.channel().isActive() || !in.isReadable() ) // FlameCord - Check if connection is readable
{
return;
}
--
2.34.1.windows.1