From c16255278bbe8c2f435afbf5e18d02ae8d25a968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E6=9E=97?= Date: Wed, 13 Mar 2024 10:12:09 +0800 Subject: [PATCH] add frame clear --- .../com/corundumstudio/socketio/protocol/PacketDecoder.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/corundumstudio/socketio/protocol/PacketDecoder.java b/src/main/java/com/corundumstudio/socketio/protocol/PacketDecoder.java index 73303f3e..d3f8286f 100644 --- a/src/main/java/com/corundumstudio/socketio/protocol/PacketDecoder.java +++ b/src/main/java/com/corundumstudio/socketio/protocol/PacketDecoder.java @@ -301,6 +301,8 @@ private void parseBody(ClientHead head, ByteBuf frame, Packet packet) throws IOE ByteBufInputStream in = new ByteBufInputStream(frame); AckArgs args = jsonSupport.readAckArgs(in, callback); packet.setData(args.getArgs()); + }else { + frame.clear(); } }