mirror of https://github.com/grpc/grpc-node.git
grpc-js: pick_first: fix currentPick comparison in resetSubchannelList
This commit is contained in:
parent
85bc3c2e78
commit
6d4e08cfd4
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@grpc/grpc-js",
|
"name": "@grpc/grpc-js",
|
||||||
"version": "1.9.11",
|
"version": "1.9.12",
|
||||||
"description": "gRPC Library for Node - pure JS implementation",
|
"description": "gRPC Library for Node - pure JS implementation",
|
||||||
"homepage": "https://grpc.io/",
|
"homepage": "https://grpc.io/",
|
||||||
"repository": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",
|
"repository": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",
|
||||||
|
|
|
@ -382,7 +382,7 @@ export class PickFirstLoadBalancer implements LoadBalancer {
|
||||||
|
|
||||||
private resetSubchannelList() {
|
private resetSubchannelList() {
|
||||||
for (const child of this.children) {
|
for (const child of this.children) {
|
||||||
if (child.subchannel !== this.currentPick) {
|
if (!(this.currentPick && child.subchannel.realSubchannelEquals(this.currentPick))) {
|
||||||
/* The connectivity state listener is the same whether the subchannel
|
/* The connectivity state listener is the same whether the subchannel
|
||||||
* is in the list of children or it is the currentPick, so if it is in
|
* is in the list of children or it is the currentPick, so if it is in
|
||||||
* both, removing it here would cause problems. In particular, that
|
* both, removing it here would cause problems. In particular, that
|
||||||
|
|
Loading…
Reference in New Issue