Skip to content

Commit

Permalink
fix #3703
Browse files Browse the repository at this point in the history
  • Loading branch information
asiekierka committed Jan 5, 2025
1 parent 82e6cea commit 0d3fdfe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/scala/li/cil/oc/common/PacketHandler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ abstract class PacketHandler {
if (stream != null) {
stream.close()
}
// #3703 - neither 1.7.10 nor 1.12.2 release the packet ByteBuf by themselves
if (data != null && data.refCnt() > 0) {
data.release();
}
}

// Avoid AFK kicks by marking players as non-idle when they send packets.
Expand Down

0 comments on commit 0d3fdfe

Please sign in to comment.