mirror of
https://github.com/Minestom/Minestom.git
synced 2025-03-13 07:09:51 +01:00
get rod of an unnecessary allocation that was using a lot of mem
This commit is contained in:
parent
a61034fc1d
commit
f7cd00fb18
@ -163,8 +163,8 @@ public class NettyPlayerConnection extends PlayerConnection {
|
||||
if (message instanceof FramedPacket) {
|
||||
final FramedPacket framedPacket = (FramedPacket) message;
|
||||
synchronized (tickBuffer) {
|
||||
// Duplicate is necessary because of cached packets
|
||||
tickBuffer.writeBytes(framedPacket.getBody().duplicate());
|
||||
final ByteBuf body = framedPacket.getBody();
|
||||
tickBuffer.writeBytes(body, body.readerIndex(), body.readableBytes());
|
||||
}
|
||||
return;
|
||||
} else if (message instanceof ServerPacket) {
|
||||
|
Loading…
Reference in New Issue
Block a user