mirror of
https://github.com/PaperMC/Waterfall.git
synced 2024-11-17 07:45:26 +01:00
23 lines
1.0 KiB
Diff
23 lines
1.0 KiB
Diff
From 87b7ba071d916722920d1cbe01a36fb379fbf81a 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..9a7bf9b5 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
|
|
|