Skip to content

Commit

Permalink
Adjust len when skipping bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
bpitman committed Jan 6, 2016
1 parent c8f46d3 commit 6ad5ac1
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,12 @@ protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) t
if (state == ST_DECODING_ARRAY_STREAM) {
// Discard the array bracket
in.skipBytes(1);
len--;
}
// Discard leading spaces in front of a JSON object/array.
} else if (Character.isWhitespace(c)) {
in.skipBytes(1);
len--;
} else {
state = ST_CORRUPTED;
throw new CorruptedFrameException(
Expand Down

0 comments on commit 6ad5ac1

Please sign in to comment.