File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -485,6 +485,8 @@ export class PickFirstLoadBalancer implements LoadBalancer {
485
485
trace ( 'connectToAddressList([' + addressList . map ( address => subchannelAddressToString ( address ) ) + '])' ) ;
486
486
for ( const { subchannel } of newChildrenList ) {
487
487
if ( subchannel . getConnectivityState ( ) === ConnectivityState . READY ) {
488
+ this . channelControlHelper . addChannelzChild ( subchannel . getChannelzRef ( ) ) ;
489
+ subchannel . addConnectivityStateListener ( this . subchannelStateListener ) ;
488
490
this . pickSubchannel ( subchannel ) ;
489
491
return ;
490
492
}
@@ -500,10 +502,6 @@ export class PickFirstLoadBalancer implements LoadBalancer {
500
502
this . children = newChildrenList ;
501
503
for ( const { subchannel } of this . children ) {
502
504
subchannel . addConnectivityStateListener ( this . subchannelStateListener ) ;
503
- if ( subchannel . getConnectivityState ( ) === ConnectivityState . READY ) {
504
- this . pickSubchannel ( subchannel ) ;
505
- return ;
506
- }
507
505
}
508
506
for ( const child of this . children ) {
509
507
if (
You can’t perform that action at this time.
0 commit comments