Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-08 17:20:24 +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
|
||||
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);
|
||||
}
|
||||
if (!connection.shouldTransformPacket()) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren