File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
util/src/main/java/io/grpc/util
xds/src/main/java/io/grpc/xds Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -414,7 +414,7 @@ protected class ChildLbStateHelper extends ForwardingLoadBalancerHelper {
414414 @ Override
415415 public void updateBalancingState (final ConnectivityState newState ,
416416 final SubchannelPicker newPicker ) {
417- if (! childLbStates . containsKey ( key ) ) {
417+ if (currentState == SHUTDOWN ) {
418418 return ;
419419 }
420420
Original file line number Diff line number Diff line change @@ -260,16 +260,16 @@ private class ClusterManagerChildHelper extends ChildLbStateHelper {
260260 @ Override
261261 public void updateBalancingState (final ConnectivityState newState ,
262262 final SubchannelPicker newPicker ) {
263- // If we are already in the process of resolving addresses, the overall balancing state
264- // will be updated at the end of it, and we don't need to trigger that update here.
265- if (getChildLbState (getKey ()) == null ) {
263+ if (getCurrentState () == ConnectivityState .SHUTDOWN ) {
266264 return ;
267265 }
268266
269267 // Subchannel picker and state are saved, but will only be propagated to the channel
270268 // when the child instance exits deactivated state.
271269 setCurrentState (newState );
272270 setCurrentPicker (newPicker );
271+ // If we are already in the process of resolving addresses, the overall balancing state
272+ // will be updated at the end of it, and we don't need to trigger that update here.
273273 if (deletionTimer == null && !resolvingAddresses ) {
274274 updateOverallBalancingState ();
275275 }
You can’t perform that action at this time.
0 commit comments