code: @Override
      @SuppressWarnings("unchecked")
      protected final ConnectFuture connect0(
              SocketAddress remoteAddress, SocketAddress localAddress,
              IoSessionInitializer<? extends ConnectFuture> sessionInitializer) {
          H handle = null;
          boolean success = false;
          try {
              handle = newHandle(localAddress);
              if (connect(handle, remoteAddress)) {
                  ConnectFuture future = new DefaultConnectFuture();
                  T session = newSession(processor, handle);
                  initSession(session, future, sessionInitializer);
                  // Forward the remaining process to the IoProcessor.
                  session.getProcessor().add(session);
                  success = true;
                  return future;
              }
  
              success = true;
          } catch (Exception e) {
              return DefaultConnectFuture.newFailedFuture(e);
          } finally {
              if (!success && handle != null) {
                  try {
                      close(handle);
                  } catch (Exception e) {
                      ExceptionMonitor.getInstance().exceptionCaught(e);
                  }
              }
          }
  
          ConnectionRequest request = new ConnectionRequest(handle, sessionInitializer);
          connectQueue.add(request);
          startupWorker();
          wakeup();
  
          return request;
      }
docs: {@inheritDoc}