You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is just something to watch out for. In NIO 1&2, the channelInitializer can be called multiple times because we do happy eyeballs with real channels. So you might see one being brought up for IPv4 and one for IPv6. NIO will close the losing one, so as you'd expect only one channel will survive (and be handed to you via connect's future) however there might be multiple channelInitializers run.
The code right in here assumes that this doesn't happen. So worst case (unlikely) is that the Channel that NIO decides to kill will complete the multiplexerPromise and then you're left in a bad spot: multiplexerPromise succeeded with the multiplexer from the closed Channel. Likely outcome for this situation would be random hangs. In this NIO issue I describe how to handle this situation and that we should in the future offer something easier than what you have to do today.
The text was updated successfully, but these errors were encountered:
The code right in here assumes that this doesn't happen. So worst case (unlikely) is that the Channel that NIO decides to kill will complete the multiplexerPromise and then you're left in a bad spot: multiplexerPromise succeeded with the multiplexer from the closed Channel.
This is just something to watch out for. In NIO 1&2, the
channelInitializer
can be called multiple times because we do happy eyeballs with real channels. So you might see one being brought up for IPv4 and one for IPv6. NIO will close the losing one, so as you'd expect only one channel will survive (and be handed to you viaconnect
's future) however there might be multiplechannelInitializer
s run.The code right in here assumes that this doesn't happen. So worst case (unlikely) is that the
Channel
that NIO decides to kill will complete themultiplexerPromise
and then you're left in a bad spot:multiplexerPromise
succeeded with the multiplexer from the closedChannel
. Likely outcome for this situation would be random hangs. In this NIO issue I describe how to handle this situation and that we should in the future offer something easier than what you have to do today.The text was updated successfully, but these errors were encountered: