private void enterIdleMode() {
    // nameResolver and loadBalancer are guaranteed to be non-null.  If any of them were null,
    // either the idleModeTimer ran twice without exiting the idle mode, or the task in shutdown()
    // did not cancel idleModeTimer, or enterIdle() ran while shutdown or in idle, all of
    // which are bugs.
    shutdownNameResolverAndLoadBalancer(true);
    delayedTransport.reprocess(null);
    channelLogger.log(ChannelLogLevel.INFO, "Entering IDLE state");
    channelStateManager.gotoState(IDLE);
    if (inUseStateAggregator.isInUse()) {
      exitIdleMode();
    }
  }
private void enterIdleMode ( ) { shutdownNameResolverAndLoadBalancer ( true ) ; delayedTransport . reprocess ( null ) ; channelLogger . log ( ChannelLogLevel . INFO , "Entering IDLE state" ) ; channelStateManager . gotoState ( IDLE ) ; if ( inUseStateAggregator . isInUse ( ) ) { exitIdleMode ( ) ; } }
Must be run from syncContext