Fixed a regression while cleaning up Redis codec

This commit is contained in:
Trustin Lee 2012-03-30 22:42:01 +09:00
parent 3e1a055f36
commit 2c3fef467a

View File

@ -55,7 +55,8 @@ public class RedisReplyDecoder extends ReplayingDecoder<VoidEnum> {
}
ChannelBuffer bytes = ChannelBuffers.buffer(size);
is.readBytes(bytes);
is.readBytes(bytes, 0, size);
bytes.writerIndex(size);
int cr = is.readByte();
int lf = is.readByte();
if (cr != CR || lf != LF) {