code: public void shutdown() {
          if (shutdown.compareAndSet(false, true)) {
              Runtime.getRuntime().removeShutdownHook(shutdownHook);
              try {
                  acceptorSvr.close();
                  selector.close();
              } catch (Throwable t) {
                  log.error("An error occurs when shutdown telnet server.", t);
                  throw new TelnetException(t);
              }
          }
      }
docs: 关闭telnet服务端