fix the discardedBytes counting on LineBasedFrameDecoder

Motivation:

The LineBasedFrameDecoder discardedBytes counting different compare to
DelimiterBasedFrameDecoder.

Modifications:

Add plus sign

Result:

DiscardedBytes counting correctly
This commit is contained in:
Alwayswithme 2015-04-21 14:03:27 +08:00 committed by Norman Maurer
parent 541137cc93
commit abccf18411

View File

@ -130,7 +130,7 @@ public class LineBasedFrameDecoder extends ByteToMessageDecoder {
fail(ctx, length); fail(ctx, length);
} }
} else { } else {
discardedBytes = buffer.readableBytes(); discardedBytes += buffer.readableBytes();
buffer.readerIndex(buffer.writerIndex()); buffer.readerIndex(buffer.writerIndex());
} }
return null; return null;