code: public void shutdown() throws IOException {
          try {
              selector.close();
          } catch (IOException e) {
              Logger.error("Close nio event selector fail.", e);
              throw e;
          }
      }
docs: Shutdown a selector
  @throws IOException