Below is some code snippet from the book < Netty in Action >.
I am wondering if the connect action finished after 1
and before 2
, will the ChannelFutureListener
ever get a chance to be notified?
Check the Netty javadoc, specifically for addListener. It states that the listener will be notified immediately if the operation is already complete.
So the answer is yes, it's robust.