code: func (c *Client) doShutdown() bool {
  	// Ignore the shutdown request if the client is already in the process
  	// of shutting down or already shutdown.
  	select {
  	case <-c.shutdown:
  		return false
  	default:
  	}
  
  	log.Tracef("Shutting down RPC client %s", c.config.Host)
  	close(c.shutdown)
  	return true
  }
docs: // doShutdown closes the shutdown channel and logs the shutdown unless shutdown
  // is already in progress.  It will return false if the shutdown is not needed.
  //
  // This function is safe for concurrent access.