geforkt von Mirrors/AxiomPaperPlugin
Don't process inactive channel + skip remaining bytes
Dieser Commit ist enthalten in:
Ursprung
93c618a150
Commit
1140204157
@ -25,7 +25,7 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
paperweight.paperDevBundle("1.20.2-R0.1-20231010.011415-29")
|
paperweight.paperDevBundle("1.20.2-R0.1-SNAPSHOT")
|
||||||
implementation("xyz.jpenilla:reflection-remapper:0.1.0-SNAPSHOT")
|
implementation("xyz.jpenilla:reflection-remapper:0.1.0-SNAPSHOT")
|
||||||
|
|
||||||
// Zstd Compression Library
|
// Zstd Compression Library
|
||||||
|
@ -26,6 +26,12 @@ public class AxiomBigPayloadHandler extends ByteToMessageDecoder {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception {
|
protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception {
|
||||||
|
// Don't process if channel isn't active
|
||||||
|
if (!ctx.channel().isActive()) {
|
||||||
|
in.skipBytes(in.readableBytes());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int i = in.readableBytes();
|
int i = in.readableBytes();
|
||||||
if (i != 0) {
|
if (i != 0) {
|
||||||
int readerIndex = in.readerIndex();
|
int readerIndex = in.readerIndex();
|
||||||
@ -55,6 +61,11 @@ public class AxiomBigPayloadHandler extends ByteToMessageDecoder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ctx.fireChannelRead(in.retain());
|
ctx.fireChannelRead(in.retain());
|
||||||
|
|
||||||
|
// Skip remaining bytes
|
||||||
|
if (in.readableBytes() > 0) {
|
||||||
|
in.skipBytes(in.readableBytes());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren