Skip to content

Commit

Permalink
Using discardSomeReadBytes instead of discardReadBytes for CommandHan…
Browse files Browse the repository at this point in the history
…dler's buffer

Fixes redis#725.
  • Loading branch information
gszpak committed Mar 8, 2018
1 parent e3641b4 commit 68f4033
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/io/lettuce/core/protocol/CommandHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ protected void decode(ChannelHandlerContext ctx, ByteBuf buffer) throws Interrup
}

if (buffer.refCnt() != 0) {
buffer.discardReadBytes();
buffer.discardSomeReadBytes();
}

afterComplete(ctx, command);
Expand Down

0 comments on commit 68f4033

Please sign in to comment.