Merge pull request #2037 from murgatroid99/grpc-js_dns_backoff_ip_reset

grpc-js: Fix `exitIdle` propagation and DNS IP result backoff
This commit is contained in:
Michael Lumish 2022-01-31 14:30:04 -08:00 committed by GitHub
commit 703971f692
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -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",

View File

@ -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();
}
}
}

View File

@ -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,