Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-16 21:10:30 +01:00
Don't attempt to decode empty buffers (fixes #482)
Stuff like this makes me want to drop support for <=1.13 versions of Minecraft.
Dieser Commit ist enthalten in:
Ursprung
d7435fcbb6
Commit
81311e7516
@ -62,7 +62,7 @@ public class MinecraftDecoder extends ChannelInboundHandlerAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void tryDecode(ChannelHandlerContext ctx, ByteBuf buf) throws Exception {
|
private void tryDecode(ChannelHandlerContext ctx, ByteBuf buf) throws Exception {
|
||||||
if (!ctx.channel().isActive()) {
|
if (!ctx.channel().isActive() || !buf.isReadable()) {
|
||||||
buf.release();
|
buf.release();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren