From 98b74fd220e9c96e45dc800d15f84560e11a0e8e Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Mon, 21 Dec 2020 13:14:38 -0500 Subject: [PATCH] Correctly retain message buffer for LoginPluginMessage. Fixes #407 --- .../proxy/protocol/packet/LoginPluginMessage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/LoginPluginMessage.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/LoginPluginMessage.java index a3dae879d..c1eb6b95b 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/LoginPluginMessage.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/LoginPluginMessage.java @@ -49,7 +49,7 @@ public class LoginPluginMessage extends DeferredByteBufHolder implements Minecra this.id = ProtocolUtils.readVarInt(buf); this.channel = ProtocolUtils.readString(buf); if (buf.isReadable()) { - this.replace(buf.readSlice(buf.readableBytes())); + this.replace(buf.readRetainedSlice(buf.readableBytes())); } else { this.replace(Unpooled.EMPTY_BUFFER); }