mirror of
https://github.com/PaperMC/Waterfall.git
synced 2024-11-16 23:35:22 +01:00
23 lines
1.0 KiB
Diff
23 lines
1.0 KiB
Diff
From c3a0de08b9d4d728fe488f5d3b83e19e2766f6ae 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 aa538f74..99d203c7 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.37.3.windows.1
|
|
|