diff options
author | Mark D. Roth <roth@google.com> | 2018-04-03 10:42:10 -0700 |
---|---|---|
committer | Mark D. Roth <roth@google.com> | 2018-04-03 10:42:10 -0700 |
commit | 8c93fc89fbe4f58f68e620655e619465d82a6129 (patch) | |
tree | f1df00bca6e40490d118ce564ac9e89f7c7832f6 /src/core/ext/filters/client_channel/lb_policy/subchannel_list.h | |
parent | 5193e97100365ff8cfebf609afad3d2c8d09bb5d (diff) |
more WIP on RR
Diffstat (limited to 'src/core/ext/filters/client_channel/lb_policy/subchannel_list.h')
-rw-r--r-- | src/core/ext/filters/client_channel/lb_policy/subchannel_list.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h b/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h index 0824fe373c..c643f4cb4b 100644 --- a/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +++ b/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h @@ -79,11 +79,15 @@ class SubchannelData { return curr_connectivity_state_; } - virtual grpc_connectivity_state CheckConnectivityStateLocked() { + void CheckConnectivityStateLocked() { + GPR_ASSERT(!connectivity_notification_pending_); + grpc_error* error = GRPC_ERROR_NONE; pending_connectivity_state_unsafe_ = - grpc_subchannel_check_connectivity(subchannel(), nullptr); - curr_connectivity_state_ = pending_connectivity_state_unsafe_; - return curr_connectivity_state_; + grpc_subchannel_check_connectivity(subchannel(), &error); + if (pending_connectivity_state_unsafe_ != curr_connectivity_state_) { + curr_connectivity_state_ = pending_connectivity_state_unsafe_; + ProcessConnectivityChangeLocked(error); + } } // Unrefs the subchannel. |