docs: @Override
      public void cleanup() {
          if(nioThread != null){
              nioThread.toStop();
          }
  
          if (selectionKey != null) {
  
              SocketChannel sock = (SocketChannel) selectionKey.channel();
              selectionKey.cancel();
              try {
                  sock.socket().shutdownInput();
              } catch (IOException e) {
                  if (LOGGER.isDebugEnabled()) {
                      LOGGER.debug("Ignoring exception during shutdown input", e);
                  }
              }
              try {
                  sock.socket().shutdownOutput();
              } catch (IOException e) {
                  if (LOGGER.isDebugEnabled()) {
                      LOGGER.debug("Ignoring exception during shutdown output",
                              e);
                  }
              }
              try {
                  sock.socket().close();
              } catch (IOException e) {
                  if (LOGGER.isDebugEnabled()) {
                      LOGGER.debug("Ignoring exception during socket close", e);
                  }
              }
              try {
                  sock.close();
              } catch (IOException e) {
                  if (LOGGER.isDebugEnabled()) {
                      LOGGER.debug("Ignoring exception during channel close", e);
                  }
              }
          }
          try {
              Thread.sleep(100);
          } catch (InterruptedException e) {
              if (LOGGER.isDebugEnabled()) {
                  LOGGER.debug("SendThread interrupted during sleep, ignoring");
              }
          }
          selectionKey = null;
      }