Skip to content

Commit 5be024f

Browse files
committed
grpc-js: Delegate to child picker in ResolvingLoadBalancer#updateResolution
1 parent ddb8de2 commit 5be024f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/grpc-js/src/resolving-load-balancer.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,11 @@ export class ResolvingLoadBalancer implements LoadBalancer {
264264
private updateResolution() {
265265
this.innerResolver.updateResolution();
266266
if (this.currentState === ConnectivityState.IDLE) {
267-
this.updateState(ConnectivityState.CONNECTING, new QueuePicker(this));
267+
/* this.latestChildPicker is initialized as new QueuePicker(this), which
268+
* is an appropriate value here if the child LB policy is unset.
269+
* Otherwise, we want to delegate to the child here, in case that
270+
* triggers something. */
271+
this.updateState(ConnectivityState.CONNECTING, this.latestChildPicker);
268272
}
269273
this.backoffTimeout.runOnce();
270274
}

0 commit comments

Comments
 (0)