Skip to content

Commit 0d3fdfe

Browse files
committed
fix #3703
1 parent 82e6cea commit 0d3fdfe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/scala/li/cil/oc/common/PacketHandler.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ abstract class PacketHandler {
3838
if (stream != null) {
3939
stream.close()
4040
}
41+
// #3703 - neither 1.7.10 nor 1.12.2 release the packet ByteBuf by themselves
42+
if (data != null && data.refCnt() > 0) {
43+
data.release();
44+
}
4145
}
4246

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

0 commit comments

Comments
 (0)