Skip to content

Commit

Permalink
Merge pull request #2199 from murgatroid99/grpc-js_lb_switchover_impr…
Browse files Browse the repository at this point in the history
…ovement

grpc-js: Switch LB policy when new one is not CONNECTING
  • Loading branch information
murgatroid99 committed Aug 18, 2022
2 parents 1b1930f + 5a7f89a commit 0a94d40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/grpc-js/src/load-balancer-child-handler.ts
Expand Up @@ -48,7 +48,7 @@ export class ChildLoadBalancerHandler implements LoadBalancer {
}
updateState(connectivityState: ConnectivityState, picker: Picker): void {
if (this.calledByPendingChild()) {
if (connectivityState !== ConnectivityState.READY) {
if (connectivityState === ConnectivityState.CONNECTING) {
return;
}
this.parent.currentChild?.destroy();
Expand Down

0 comments on commit 0a94d40

Please sign in to comment.