netty/netty — pull request #2375 by normanmaurer (2014-04-10 06:31:48+00:00)
Title: Fix bug in respecting ChannelConfig.setAutoRead(false)

Motivation:
At the moment ChanneConfig.setAutoRead(false) only is guaranteer to not have an extra channelRead(...) triggered when used from within the channelRead(...) or channelReadComplete(...) method. This is not the correct behaviour as it should also work from other methods that are triggered from within the EventLoop. For example a valid use case is to have it called from within a ChannelFutureListener, which currently not work as expected.

Modifications:
Implement the logic the right way for the NIO/OIO and native transport, specific to the transport implementation.

Result:
It is now also possible to use ChannelConfig.setAutoRead(false) from other methods that are called from within the EventLoop and have direct effect.