From 308f0623b627268b8e8de8b08c63c402f1cfbb1e Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 15 Nov 2024 20:01:43 +0000 Subject: [PATCH] [pick_first] fix shutdown bug in new PF impl --- src/core/load_balancing/pick_first/pick_first.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/load_balancing/pick_first/pick_first.cc b/src/core/load_balancing/pick_first/pick_first.cc index c49b8ad2bfb49..016e198000def 100644 --- a/src/core/load_balancing/pick_first/pick_first.cc +++ b/src/core/load_balancing/pick_first/pick_first.cc @@ -1021,6 +1021,8 @@ void PickFirst::SubchannelList::Orphan() { << "[PF " << policy_.get() << "] Shutting down subchannel_list " << this; CHECK(!shutting_down_); shutting_down_ = true; + // Shut down subchannels. + subchannels_.clear(); // Cancel Happy Eyeballs timer, if any. if (timer_handle_.has_value()) { policy_->channel_control_helper()->GetEventEngine()->Cancel(*timer_handle_);