Description
This is best shown with UDP since TCP will cause a close session to occur.
If channel.write() throws an exception, e.g. the host becomes unreachable because of network connection is removed, then WriteFuture.awaitUninterruptibly() will hang - as it will never have setWritten(false) or setException() called.
I have modified the MemoryMonitor example to show this happening.
You must manually pull your network cable (or disable your Network Adapter) while the client is running to see this happen.