Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-26 16:12:42 +01:00
Check if the channel is open in BukkitEncodeHandler
Dieser Commit ist enthalten in:
Ursprung
04e572fa30
Commit
8edad67394
@ -43,7 +43,8 @@ public final class BukkitEncodeHandler extends MessageToMessageEncoder<ByteBuf>
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void encode(final ChannelHandlerContext ctx, final ByteBuf bytebuf, final List<Object> out) throws Exception {
|
protected void encode(final ChannelHandlerContext ctx, final ByteBuf bytebuf, final List<Object> out) throws Exception {
|
||||||
if (!connection.checkClientboundPacket()) {
|
// Check if the channel is open as older servers might start sending packets through the pipeline despite the channel being closed
|
||||||
|
if (!connection.checkClientboundPacket() || !ctx.channel().isOpen()) {
|
||||||
throw CancelEncoderException.generate(null);
|
throw CancelEncoderException.generate(null);
|
||||||
}
|
}
|
||||||
if (!connection.shouldTransformPacket()) {
|
if (!connection.shouldTransformPacket()) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren