Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Every time the timeout hits, the timeout value of the next connection try will increase. The timeout will hit iff a connection stays at the `connecting` state longer than the timeout value, as indicated by ClusterConnectionStates.NodeConnectionState. The connection state of a node may change will change iff SelectionKey.OP_CONNECT is detected by nioSelector.Select(). The connection state may transit from `connecting` to 

  1. `disconnected` when SocketChannel.finishConnect() throws IOException.
  2. `connected` when SocketChannel.finishConnect() return TRUE.

In other words, the timeout will hit and increase iff SocketChannel.finishConnect() keep returning false before iff the interested SelectionKey.OP_CONNECT doesn't happen before the timeout arrives, which means, for example, network congestion, failure of the ARP request, packet filtering, routing error, or a silent discard may happen.

...