Skip to content

Commit

Permalink
pickfirst: check b.sc before calling Connect (#4971)
Browse files Browse the repository at this point in the history
  • Loading branch information
dfawley committed Nov 11, 2021
1 parent 52d9416 commit 6a896a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pickfirst.go
Expand Up @@ -125,7 +125,7 @@ func (b *pickfirstBalancer) Close() {
}

func (b *pickfirstBalancer) ExitIdle() {
if b.state == connectivity.Idle {
if b.sc != nil && b.state == connectivity.Idle {
b.sc.Connect()
}
}
Expand Down

0 comments on commit 6a896a3

Please sign in to comment.