docs: protected boolean attemptConnectWork(ConnectInfo ci) {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.entry(tc, "attemptConnectWork");
          }
  
          boolean returnConnectDone = true;
  
          switch (ci.action) {
  
              case (ConnectInfo.FINISH_CONNECTION): {
                  if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                      Tr.event(tc, "Finish_connection case for, local: " + ci.localAddress + " remote: " + ci.remoteAddress);
                  }
                  if (ci.channel.isConnectionPending()) {
                      try {
                          boolean connectDone = ci.channel.finishConnect();
                          if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                              Tr.event(tc, "Finishconnect returned " + connectDone + " for, local: " + ci.ioSocket.getSocket().getLocalSocketAddress() + " remote: "
                                           + ci.ioSocket.getSocket().getRemoteSocketAddress());
                          }
                          if (!connectDone) {
                              // Not connected yet, so just put it back in the selector.
                              // This can happen if the network connection goes down
                              // while connect is in selector
                              if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                                  Tr.event(tc, "FinishConnect returned false, retrying");
                              }
                              queueConnectForSelector(ci);
                              returnConnectDone = false;
                              break;
                          }
                          if (!ci.channel.isConnected()) {
                              if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                                  Tr.event(tc, "FinishConnect returned true, but not connected");
                              }
  
                              // Add local and remote address information
                              InetSocketAddress iaRemote = ci.remoteAddress;
                              InetSocketAddress iaLocal = ci.localAddress;
                              IOException e = new IOException("Connection could not be established. local=" + iaLocal + " remote=" + iaRemote);
  
                              ci.setError(e);
                              ci.tcpConnLink.connectFailed(e);
  
                              break;
                          }
                      } catch (IOException ioe) {
  
                          if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                              Tr.event(tc, "SocketChannel connect failed, local: " + ci.ioSocket.getSocket().getLocalSocketAddress() + " remote: "
                                           + ci.ioSocket.getSocket().getRemoteSocketAddress());
                          }
                          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                              Tr.debug(tc, "SocketChannel.finishConnect Exception Caught: " + ioe);
                          }
  
                          ci.setError(ioe);
                          ci.tcpConnLink.connectFailed(ioe);
                          break;
                      }
                  } else {
                      if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                          Tr.event(tc, "Connection got selected, but isConnectionPending returned false");
                      }
                      returnConnectDone = false;
                      queueConnectForSelector(ci);
                      break;
                  }
                  if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                      Tr.event(tc, "SocketChannel connected, local: " + ci.ioSocket.getSocket().getLocalSocketAddress() + " remote: "
                                   + ci.ioSocket.getSocket().getRemoteSocketAddress());
                  }
  
                  ci.setFinishComplete();
  
                  try {
                      ci.tcpConnLink.connectComplete(ci.ioSocket);
                  } catch (IOException ioe) {
  
                      if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                          Tr.event(tc, "SocketChannel connect failed, local: " + ci.ioSocket.getSocket().getLocalSocketAddress() + " remote: "
                                       + ci.ioSocket.getSocket().getRemoteSocketAddress());
                      }
                      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                          Tr.debug(tc, "SocketChannel.finishConnect Exception Caught: " + ioe);
                      }
                      ci.setError(ioe);
                      ci.tcpConnLink.connectFailed(ioe);
                  }
                  break;
              }
              case (ConnectInfo.CALL_ERROR): {
                  ci.tcpConnLink.connectFailed(ci.errorException);
                  break;
              }
              default: {
                  if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                      Tr.event(tc, "Should never get here - default.");
                  }
                  break;
              }
          } // end-switch
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.exit(tc, "attemptConnectWork returning " + returnConnectDone);
          }
  
          return returnConnectDone;
      }