diff options
author | Mark D. Roth <roth@google.com> | 2018-08-13 09:44:53 -0700 |
---|---|---|
committer | Mark D. Roth <roth@google.com> | 2018-08-13 09:44:53 -0700 |
commit | 4e1e6ceda98b0a196ddb7939153edb78a0a20dbe (patch) | |
tree | 2e7fe98c01b0f2cc61fb46741617e2cb0dc8a385 /src/core/ext/filters/client_channel/lb_policy/subchannel_list.h | |
parent | 186df431dec8eb09e146a667edf8cfc7d45958de (diff) |
Fix pick_first to not throw away unused subchannels.
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 | 9 |
1 files changed, 4 insertions, 5 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 0fa2f04e73..91ddaec8b8 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 @@ -102,11 +102,6 @@ class SubchannelData { return pending_connectivity_state_unsafe_; } - // Unrefs the subchannel. May be used if an individual subchannel is - // no longer needed even though the subchannel list as a whole is not - // being unreffed. - virtual void UnrefSubchannelLocked(const char* reason); - // Resets the connection backoff. // TODO(roth): This method should go away when we move the backoff // code out of the subchannel and into the LB policies. @@ -154,6 +149,10 @@ class SubchannelData { grpc_connectivity_state connectivity_state, grpc_error* error) GRPC_ABSTRACT; + // Unrefs the subchannel. May be overridden by subclasses that need + // to perform extra cleanup when unreffing the subchannel. + virtual void UnrefSubchannelLocked(const char* reason); + private: // Updates connected_subchannel_ based on pending_connectivity_state_unsafe_. // Returns true if the connectivity state should be reported. |