mirror of https://github.com/grpc/grpc-node.git
grpc-js: round_robin: Request resolution on connection drop
This commit is contained in:
parent
0c5ab9876b
commit
b3c24d080f
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@grpc/grpc-js",
|
||||
"version": "1.11.2",
|
||||
"version": "1.11.3",
|
||||
"description": "gRPC Library for Node - pure JS implementation",
|
||||
"homepage": "https://grpc.io/",
|
||||
"repository": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",
|
||||
|
|
|
@ -110,6 +110,13 @@ export class RoundRobinLoadBalancer implements LoadBalancer {
|
|||
channelControlHelper,
|
||||
{
|
||||
updateState: (connectivityState, picker) => {
|
||||
/* Ensure that name resolution is requested again after active
|
||||
* connections are dropped. This is more aggressive than necessary to
|
||||
* accomplish that, so we are counting on resolvers to have
|
||||
* reasonable rate limits. */
|
||||
if (this.currentState === ConnectivityState.READY && connectivityState !== ConnectivityState.READY) {
|
||||
this.channelControlHelper.requestReresolution();
|
||||
}
|
||||
this.calculateAndUpdateState();
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue