Skip to content

Commit

Permalink
Merge pull request #2037 from murgatroid99/grpc-js_dns_backoff_ip_reset
Browse files Browse the repository at this point in the history
grpc-js: Fix `exitIdle` propagation and DNS IP result backoff
  • Loading branch information
murgatroid99 committed Jan 31, 2022
2 parents 8d19d6a + f49ed62 commit 703971f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/grpc-js/package.json
@@ -1,6 +1,6 @@
{
"name": "@grpc/grpc-js",
"version": "1.5.3",
"version": "1.5.4",
"description": "gRPC Library for Node - pure JS implementation",
"homepage": "https://grpc.io/",
"repository": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",
Expand Down
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 703971f

Please sign in to comment.