예제 #1
0
        public void UpdateState(BalancerState state)
        {
            _controller.UpdateState(state);
            _state = state.ConnectivityState;

            NotifySubscribers();
        }
 private void ResolverError(Status status)
 {
     // If balancer doesn't have a ready subchannel then remove any current subchannel
     // and update channel state with resolver error.
     switch (_state)
     {
     case ConnectivityState.Idle:
     case ConnectivityState.Connecting:
     case ConnectivityState.TransientFailure:
         if (_subchannel != null)
         {
             RemoveSubchannel();
         }
         _controller.UpdateState(new BalancerState(ConnectivityState.TransientFailure, new ErrorPicker(status)));
         break;
     }
 }