6b6475fb56
Motivation: ByteToMessageDecoder only looks at the last channelRead() in the batch of channelRead()-s when determining whether or not it should call ChannelHandlerContext#read() to consume more data when !isAutoRead. This will lead to read() calls issued unnecessaily and unprompted if the very last channelRead() didn't result in at least one decoded message, even if there have been messages decoded from other channelRead()-s in the current batch. Modifications: Track decode outcomes for the entire batch of channelRead() calls and only issue a read in BTMD if the entire batch of channelRead() calls yielded no complete messages. Result: ByteToMessageDecoder will no longer overread when the very last read yielded no message, but the batch of reads did. |
||
---|---|---|
.. | ||
src | ||
pom.xml |