docs: @Override
      protected void checkForTimeouts() {
          // See if anything may have timed out
          if (currentTime < nextTimeoutTime) {
              return;
          }
          Set<SelectionKey> selectorKeys = selector.keys();
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              Tr.debug(this, tc, "checkForTimeouts - checking " + selectorKeys.size() + " keys for timeouts");
          }
          if (selectorKeys.isEmpty()) {
              // if this isn't the primary (first) selector, see if it should be closed
              if (countIndex != 0) {
                  // if we have already been waiting, and still no keys, and this isn't
                  // the primary
                  // selector, we should close this selector/thread
                  if (waitingToQuit) {
                      quit = true;
                  } else {
                      wqm.updateCount(countIndex, WorkQueueManager.CS_DELETE_IN_PROGRESS, channelType);
                      waitingToQuit = true;
                      nextTimeoutTime = currentTime + TCPFactoryConfiguration.getChannelSelectorWaitToTerminate();
  
                  }
              } else {
                  nextTimeoutTime = currentTime + TCPFactoryConfiguration.getChannelSelectorIdleTimeout();
              }
          } else {
              waitingToQuit = false;
              // go through requests, timing out those that need it, and calculating new
              // timeout
              // set nexttimeouttime to whatever the selectoridletimeout is, and work
              // back from there
              nextTimeoutTime = currentTime + TCPFactoryConfiguration.getChannelSelectorIdleTimeout();
  
              for (SelectionKey key : selectorKeys) {
                  try {
                      if (0 == key.interestOps()) {
                          // not active
                          continue;
                      }
                      // only consider keys that are currently waiting for connect
                      ConnectInfo ci = (ConnectInfo) key.attachment();
  
                      if (ci.timeout != TCPConnectRequestContext.NO_TIMEOUT) {
                          if (ci.nextTimeoutTime <= currentTime) {
                              if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                                  Tr.event(this, tc, "Inactivity timeout on connect operation for channel" + ci.ioSocket.getChannel());
                              }
  
                              // create timeout exception to pass to callback error method
                              // Add local and remote address information
                              InetSocketAddress iaRemote = ci.remoteAddress;
                              InetSocketAddress iaLocal = ci.localAddress;
                              IOException e = new SocketTimeoutException("Socket operation timed out before it could be completed. local=" + iaLocal + " remote=" + iaRemote);
  
                              // Hand off to another thread
                              ci.setError(e);
                              if (wqm.dispatchConnect(ci)) {
                                  // unable to dispatch error, handle now
                                  key.cancel();
                                  ci.ioSocket.close();
                              }
                          } else {
                              // see if we should timeout sooner than our current setting
                              if (ci.nextTimeoutTime < nextTimeoutTime) {
                                  nextTimeoutTime = ci.nextTimeoutTime;
                              }
                          }
                      }
                  } catch (CancelledKeyException cke) {
                      // either we didn't get the key, or we already dispatched the
                      // error. In either case, there is nothing more to do
                      continue;
                  }
              }
          }
      }