code: func (process *TeleportProcess) reconnectToAuthService(role teleport.Role) (*Connector, error) {
  	retryTime := defaults.HighResPollingPeriod
  	for {
  		connector, err := process.connectToAuthService(role)
  		if err == nil {
  			// if connected and client is present, make sure the connector's
  			// client works, by using call that should succeed at all times
  			if connector.Client != nil {
  				_, err = connector.Client.GetNamespace(defaults.Namespace)
  				if err == nil {
  					return connector, nil
  				}
  				process.Debugf("Connected client %v failed to execute test call: %v. Node or proxy credentials are out of sync.", role, err)
  				if err := connector.Client.Close(); err != nil {
  					process.Debugf("Failed to close the client: %v.", err)
  				}
  			}
  		}
  		process.Infof("%v failed attempt connecting to auth server: %v.", role, err)
  		// Wait in between attempts, but return if teleport is shutting down
  		select {
  		case <-time.After(retryTime):
  		case <-process.ExitContext().Done():
  			process.Infof("%v stopping connection attempts, teleport is shutting down.", role)
  			return nil, ErrTeleportExited
  		}
  	}
  }
docs: // reconnectToAuthService continuously attempts to reconnect to the auth
  // service until succeeds or process gets shut down