mirror of
https://github.com/grpc/grpc-node.git
synced 2025-12-08 18:23:54 +00:00
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:
commit
703971f692
@ -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",
|
||||
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user