The behaviour of ReadTimeoutHandler
seems to have changed in Netty 4 compared with Netty 3. In Netty 4 when the timeout fires, Netty not only raises a ReadTimeoutException
but also closes the channel. This was not the case before. In Netty 3, the behaviour is to only raise the ReadTimeoutException
, the channel is not closed.
I have a use case where I need to write a message to the channel, on timeout. This can't be done anymore because by the time, the code that handles the thrown ReadTimeoutException
is reached, the channel is already closed.
Any tips/ideas on how to go about this use case in Netty 4? Basically write to the channel on ReadTimeoutException
before Netty closes the channel?