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:
parent
541137cc93
commit
abccf18411
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user