Skip to content

Commit

Permalink
grpc-js: pick_first: fix currentPick comparison in resetSubchannelList
Browse files Browse the repository at this point in the history
  • Loading branch information
murgatroid99 committed Nov 27, 2023
1 parent 85bc3c2 commit 6d4e08c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/grpc-js/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/grpc-js/src/load-balancer-pick-first.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6d4e08c

Please sign in to comment.