code: public synchronized void close() {
          if (!closed && channel != null) {
              ConnectionWatchdog watchdog = channel.getPipeline().get(ConnectionWatchdog.class);
              watchdog.setReconnect(false);
              closed = true;
              channel.close();
          }
      }
docs: Close the connection.