mirror of https://github.com/grpc/grpc-node.git
Merge pull request #1324 from orgads/round-robin-lb
RoundRobinLoadBalancer: Register the state listener
This commit is contained in:
commit
4346327193
|
@ -198,6 +198,8 @@ export class RoundRobinLoadBalancer implements LoadBalancer {
|
|||
this.channelControlHelper.createSubchannel(address, {})
|
||||
);
|
||||
for (const subchannel of this.subchannels) {
|
||||
subchannel.ref();
|
||||
subchannel.addConnectivityStateListener(this.subchannelStateListener);
|
||||
const subchannelState = subchannel.getConnectivityState();
|
||||
this.subchannelStateCounts[subchannelState] += 1;
|
||||
if (
|
||||
|
|
Loading…
Reference in New Issue