From 6d4e08cfd40cf755d55b4871777c16e4e46ecaee Mon Sep 17 00:00:00 2001 From: Michael Lumish Date: Mon, 27 Nov 2023 12:03:12 -0500 Subject: [PATCH] grpc-js: pick_first: fix currentPick comparison in resetSubchannelList --- packages/grpc-js/package.json | 2 +- packages/grpc-js/src/load-balancer-pick-first.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/grpc-js/package.json b/packages/grpc-js/package.json index 4c408873..465f56fb 100644 --- a/packages/grpc-js/package.json +++ b/packages/grpc-js/package.json @@ -1,6 +1,6 @@ { "name": "@grpc/grpc-js", - "version": "1.9.11", + "version": "1.9.12", "description": "gRPC Library for Node - pure JS implementation", "homepage": "https://grpc.io/", "repository": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js", diff --git a/packages/grpc-js/src/load-balancer-pick-first.ts b/packages/grpc-js/src/load-balancer-pick-first.ts index 214f92e2..75c9d4cf 100644 --- a/packages/grpc-js/src/load-balancer-pick-first.ts +++ b/packages/grpc-js/src/load-balancer-pick-first.ts @@ -382,7 +382,7 @@ export class PickFirstLoadBalancer implements LoadBalancer { private resetSubchannelList() { 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 * 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