code: void handleLoopException(Throwable t) {
          logger.warn("Unexpected exception in the selector loop.", t);
  
          // Prevent possible consecutive immediate failures that lead to
          // excessive CPU consumption.
          try {
              Thread.sleep(1000);
          } catch (InterruptedException e) {
              // Ignore.
          }
      }
docs: Visible only for testing!