Check if channel is opened before reading packet

This commit is contained in:
FatSaw
2022-07-31 06:00:48 +03:00
parent cb55572504
commit 6a7f2b8699

View File

@@ -365,7 +365,10 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
@Override
protected void channelRead0(ChannelHandlerContext channelhandlercontext, Packet object) throws Exception { // CraftBukkit - fix decompile error
this.a(channelhandlercontext, object);
// FlamePaper - Check if channel is opened before reading packet
if (isConnected()) {
this.a(channelhandlercontext, object);
}
}
public static class QueuedPacket { // Akarin - default -> public