Address a couple of FIXMEs.

reviewable/pr14886/r2
Mark D. Roth 7 years ago
parent 3cfbd98d56
commit e2620e1422
  1. 11
      src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc

@ -174,7 +174,7 @@ class RoundRobin : public LoadBalancingPolicy {
/** our connectivity state tracker */
grpc_connectivity_state_tracker state_tracker_;
/** Index into subchannel_list_ for last pick. */
size_t last_ready_subchannel_index_ = 0; // FIXME: set to -1?
size_t last_ready_subchannel_index_ = -1;
};
RoundRobin::RoundRobin(const Args& args) : LoadBalancingPolicy(args) {
@ -562,15 +562,6 @@ void RoundRobin::RoundRobinSubchannelData::ProcessConnectivityChangeLocked(
grpc_error_string(error));
}
GPR_ASSERT(subchannel() != nullptr);
// FIXME: this check may not be needed, because subchannel_list should
// always be shutting down if policy is shutting down
// If the policy is shutting down, unref and return.
if (p->shutdown_) {
StopConnectivityWatchLocked();
UnrefSubchannelLocked("rr_shutdown");
subchannel_list()->UnrefForConnectivityWatch("rr_shutdown");
return;
}
// If the subchannel list is shutting down, stop watching.
if (subchannel_list()->shutting_down() || error == GRPC_ERROR_CANCELLED) {
StopConnectivityWatchLocked();

Loading…
Cancel
Save