Skip to content

Commit

Permalink
start connecting in exitIdle only when balancer is in idle
Browse files Browse the repository at this point in the history
  • Loading branch information
arjan-bal committed Aug 14, 2024
1 parent 0792002 commit 3561462
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion balancer/pickfirst_leaf/pickfirst_leaf.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,9 @@ func (b *pickfirstBalancer) ExitIdle() {
// exitIdle starts a connection attempt if not already started.
// Only executed in the context of a serializer callback.
func (b *pickfirstBalancer) exitIdle() {
b.requestConnection()
if b.state == connectivity.Idle {
b.requestConnection()
}
}

func (b *pickfirstBalancer) closeSubConns() {
Expand Down

0 comments on commit 3561462

Please sign in to comment.