grpc-js: Delegate to child picker in ResolvingLoadBalancer#updateResolution

This commit is contained in:
Michael Lumish 2023-09-18 17:32:29 -07:00
parent ddb8de2992
commit 5be024f060
1 changed files with 5 additions and 1 deletions

View File

@ -264,7 +264,11 @@ export class ResolvingLoadBalancer implements LoadBalancer {
private updateResolution() {
this.innerResolver.updateResolution();
if (this.currentState === ConnectivityState.IDLE) {
this.updateState(ConnectivityState.CONNECTING, new QueuePicker(this));
/* this.latestChildPicker is initialized as new QueuePicker(this), which
* is an appropriate value here if the child LB policy is unset.
* Otherwise, we want to delegate to the child here, in case that
* triggers something. */
this.updateState(ConnectivityState.CONNECTING, this.latestChildPicker);
}
this.backoffTimeout.runOnce();
}