docs: @Override
    public ManagedChannelImpl shutdown() {
      channelLogger.log(ChannelLogLevel.DEBUG, "shutdown() called");
      if (!shutdown.compareAndSet(false, true)) {
        return this;
      }
  
      // Put gotoState(SHUTDOWN) as early into the syncContext's queue as possible.
      // delayedTransport.shutdown() may also add some tasks into the queue. But some things inside
      // delayedTransport.shutdown() like setting delayedTransport.shutdown = true are not run in the
      // syncContext's queue and should not be blocked, so we do not drain() immediately here.
      final class Shutdown implements Runnable {
        @Override
        public void run() {
          channelLogger.log(ChannelLogLevel.INFO, "Entering SHUTDOWN state");
          channelStateManager.gotoState(SHUTDOWN);
        }
      }
  
      syncContext.executeLater(new Shutdown());
  
      uncommittedRetriableStreamsRegistry.onShutdown(SHUTDOWN_STATUS);
      final class CancelIdleTimer implements Runnable {
        @Override
        public void run() {
          cancelIdleTimer(/* permanent= */ true);
        }
      }
  
      syncContext.execute(new CancelIdleTimer());
      return this;
    }