Skip to content

Commit cdf756e

Browse files
committed
changed return type of exitIdle
1 parent 78de2d2 commit cdf756e

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

internal/balancergroup/balancergroup.go

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,13 @@ func (sbc *subBalancerWrapper) startBalancer() {
106106
}
107107
}
108108

109-
// exitIdle invokes the sub-balancer's ExitIdle method. Returns a true
110-
// indicating whether or not the operation was completed.
111-
func (sbc *subBalancerWrapper) exitIdle() (complete bool) {
112-
if b := sbc.balancer; b != nil {
113-
b.ExitIdle()
109+
// exitIdle invokes the sub-balancer's ExitIdle method.
110+
func (sbc *subBalancerWrapper) exitIdle() {
111+
b := sbc.balancer
112+
if b == nil {
113+
return
114114
}
115-
return true
115+
b.ExitIdle()
116116
}
117117

118118
func (sbc *subBalancerWrapper) updateClientConnState(s balancer.ClientConnState) error {
@@ -573,9 +573,7 @@ func (bg *BalancerGroup) ExitIdle() {
573573
return
574574
}
575575
for _, config := range bg.idToBalancerConfig {
576-
if !config.exitIdle() {
577-
bg.connect(config)
578-
}
576+
config.exitIdle()
579577
}
580578
}
581579

@@ -588,9 +586,7 @@ func (bg *BalancerGroup) ExitIdleOne(id string) {
588586
return
589587
}
590588
if config := bg.idToBalancerConfig[id]; config != nil {
591-
if !config.exitIdle() {
592-
bg.connect(config)
593-
}
589+
config.exitIdle()
594590
}
595591
}
596592

0 commit comments

Comments
 (0)