Skip to content

Commit 202a735

Browse files
authored
Merge pull request #2623 from murgatroid99/grpc-js_pick_first_reset_listener_fix
grpc-js: pick_first: fix currentPick comparison in resetSubchannelList
2 parents 85bc3c2 + 6d4e08c commit 202a735

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/grpc-js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@grpc/grpc-js",
3-
"version": "1.9.11",
3+
"version": "1.9.12",
44
"description": "gRPC Library for Node - pure JS implementation",
55
"homepage": "https://grpc.io/",
66
"repository": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",

packages/grpc-js/src/load-balancer-pick-first.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ export class PickFirstLoadBalancer implements LoadBalancer {
382382

383383
private resetSubchannelList() {
384384
for (const child of this.children) {
385-
if (child.subchannel !== this.currentPick) {
385+
if (!(this.currentPick && child.subchannel.realSubchannelEquals(this.currentPick))) {
386386
/* The connectivity state listener is the same whether the subchannel
387387
* is in the list of children or it is the currentPick, so if it is in
388388
* both, removing it here would cause problems. In particular, that

0 commit comments

Comments
 (0)