Skip to content

Commit

Permalink
grpc-js: Fix exitIdle propagation and DNS IP result backoff
Browse files Browse the repository at this point in the history
  • Loading branch information
murgatroid99 committed Jan 31, 2022
1 parent 8d19d6a commit ba70f71
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/grpc-js/src/load-balancer-child-handler.ts
Expand Up @@ -125,9 +125,9 @@ export class ChildLoadBalancerHandler implements LoadBalancer {
}
exitIdle(): void {
if (this.currentChild) {
this.currentChild.resetBackoff();
this.currentChild.exitIdle();
if (this.pendingChild) {
this.pendingChild.resetBackoff();
this.pendingChild.exitIdle();
}
}
}
Expand Down
1 change: 1 addition & 0 deletions packages/grpc-js/src/resolver-dns.ts
Expand Up @@ -144,6 +144,7 @@ class DnsResolver implements Resolver {
if (this.ipResult !== null) {
trace('Returning IP address for target ' + uriToString(this.target));
setImmediate(() => {
this.backoff.reset();
this.listener.onSuccessfulResolution(
this.ipResult!,
null,
Expand Down

0 comments on commit ba70f71

Please sign in to comment.