mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-06 23:22:10 -07:00
net/minecraft/network/
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
--- a/net/minecraft/network/Varint21FrameDecoder.java
|
||||
+++ b/net/minecraft/network/Varint21FrameDecoder.java
|
||||
@@ -41,6 +_,12 @@
|
||||
|
||||
@Override
|
||||
protected void decode(ChannelHandlerContext context, ByteBuf in, List<Object> out) {
|
||||
+ // Paper start - Perf: Optimize exception handling; if channel is not active just discard the packet
|
||||
+ if (!context.channel().isActive()) {
|
||||
+ in.skipBytes(in.readableBytes());
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end - Perf: Optimize exception handling
|
||||
in.markReaderIndex();
|
||||
this.helperBuf.clear();
|
||||
if (!copyVarint(in, this.helperBuf)) {
|
Reference in New Issue
Block a user