Open
Description
Netty4EagerConsumeChannelHandler
and Netty4InitiateOneReadHandler
should be hardened to handle scenarios where they're added to a closed channel. A possible case where this happens is when Netty4ProgressAndTimeoutHandler
fires an inactivity exception and closes the channel while another thread attempts to read the channel using one of the read handlers. The read handlers should handle this appropriately, preventing any deadlocking.
The question comes down to what should happen when they are added to a closed channel.
- They simply count down the
CountDownLatch
are return no content and indicate a completed state to the caller. - They throw an exception themselves about an invalid state.