Merge pull request #1324 from orgads/round-robin-lb

RoundRobinLoadBalancer: Register the state listener
This commit is contained in:
Michael Lumish 2020-03-30 11:31:53 -07:00 committed by GitHub
commit 4346327193
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

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