netty/netty — pull request #3268 by normanmaurer (2014-12-19 09:53:15+00:00)
Title: Not execute shutdownOutput(...) and close(...) in the EventLoop if SO_LI...

...NGER is used.

Motivation:

If SO_LINGER is used shutdownOutput() and close() syscalls will block until either all data was send or until the timeout exceed. This is a problem when we try to execute them on the EventLoop as this means the EventLoop may be blocked and so can not process any other I/O.

Modifications:

- Add a new ChannelOption.SO_LINGER_IO_EXECUTOR which allows to config an Executor which is used for shutdownOutput() and close() when SO_LINGER is enabled
- Use this Executor when SO_LINGER is used.

Result:

No more blocking the EventLoop if SO_LINGER is used and shutdownOutput() or close() is called.