grpc-js: pick_first: fix currentPick comparison in resetSubchannelList

This commit is contained in:
Michael Lumish 2023-11-27 12:03:12 -05:00
parent 85bc3c2e78
commit 6d4e08cfd4
2 changed files with 2 additions and 2 deletions

View File

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

View File

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