File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -178,6 +178,12 @@ func (wbsa *Aggregator) ResumeStateUpdates() {
178
178
}
179
179
}
180
180
181
+ // NeedUpdateStateOnResume sets the UpdateStateOnResume bool to true, letting a
182
+ // picker update be sent once ResumeStateUpdates is called.
183
+ func (wbsa * Aggregator ) NeedUpdateStateOnResume () {
184
+ wbsa .needUpdateStateOnResume = true
185
+ }
186
+
181
187
// UpdateState is called to report a balancer state change from sub-balancer.
182
188
// It's usually called by the balancer group.
183
189
//
Original file line number Diff line number Diff line change @@ -143,6 +143,12 @@ func (b *weightedTargetBalancer) UpdateClientConnState(s balancer.ClientConnStat
143
143
144
144
b .targets = newConfig .Targets
145
145
146
+ // To send a TF state update in the case of a configuration with no targets
147
+ // passed in.
148
+ if len (b .targets ) == 0 {
149
+ b .stateAggregator .NeedUpdateStateOnResume ()
150
+ }
151
+
146
152
return nil
147
153
}
148
154
You can’t perform that action at this time.
0 commit comments