netty/netty — pull request #2618 by sirmax (2014-06-27 23:05:35+00:00)
Title: Fix IdleStateHandler silently crashing on voidPromise

Motivation:

`IdleStateHandler` may receive a `voidPromise` into its `write` method. When it adds a listener to this promise it fails with `IllegalStateException`. `AbstractChannelHandlerContext` then swallows the `ISE` in `notifyOutboundHandlerException`, silently dropping the message sent.

Modifications:

In `IdleStateHandler.write` detect `voidPromise` and replace it with `newPromise`.

Result:

`IdleStateHandler` works as expected regardless of the promise type.