code: @Override
    public void shutdown() throws InterruptedException {
      try {
        channel.close();
        for(Map.Entry<String, Sender> entry: senders.entrySet()) {
          entry.getValue().shutdown();
        }
        senders.clear();
  
        for(Map.Entry<String, ChannelHandlerContext> entry:
            receivers.entrySet()) {
          entry.getValue().close();
        }
        receivers.clear();
  
      } finally {
        try {
          long quietPeriodSec = 0;
          long timeoutSec = 10;
          io.netty.util.concurrent.Future wf =
            workerGroup.shutdownGracefully(quietPeriodSec, timeoutSec,
                                           TimeUnit.SECONDS);
          io.netty.util.concurrent.Future bf =
            bossGroup.shutdownGracefully(quietPeriodSec, timeoutSec,
                                         TimeUnit.SECONDS);
          wf.await();
          bf.await();
          LOG.debug("Shutdown complete: {}", hostPort);
        } catch (InterruptedException ex) {
          LOG.debug("Interrupted while shutting down NioEventLoopGroup", ex);
        }
      }
    }
docs: Destroys the transport.