code: public void close() {
      refuseNewRequests.set(true);
      channel.close().awaitUninterruptibly();
      channel.eventLoop().shutdownGracefully().awaitUninterruptibly();
    }
docs: Shuts down this client and releases the underlying associated resources.
  
  <p>This operation is synchronous.</p>