Open BianJianyu opened 4 months ago
if (callback != null) { ByteBufInputStream in = new ByteBufInputStream(frame); AckArgs args = jsonSupport.readAckArgs(in, callback); packet.setData(args.getArgs()); }else { frame.clear(); } what if I write it like this? @mrniko
this is test result ,nothing exception
@malinGH
What about the case then there are other packets next to this packet? they won't be parsed if bytebuf readIndex reset to zero
It's better to use the code below.
frame.skipBytes(frame.readableBytes());
Now the buffer was consumed completely.
let me try
@mrniko Test is fail, You need to test this version, branch:master
version:2.0.9
file:com/corundumstudio/socketio/protocol/PacketDecoder.java line:300