netty/netty — pull request #3263 by normanmaurer (2014-12-19 08:53:41+00:00)
Title: Ensure ctx.fireChannelReadComplete() is only called when something was d...

...ecoded

Motivation:

ctx.fireChannelReadComplete() should only be called if something is decoded during a channelRead(...) operation. Also we must ensure that it will be called
if channelRead(...) decodes something at some point as channelRead(...) maybe called multiple times by the transport before channelReadComplete(...) is called.

Modifications:

- Ensure channelReadComplete(...) only triggers ctx.fireChannelReadComplete() when a previous channelRead(...) call decoded a message.
- Fix a bug where ctx.read() was not called if the last channelRead(...) operation did not decode a message but previous did.

Result:

Correct semantic with channelReadComplete(...) events and also ensure no stales