Skip to content

Commit

Permalink
balancer/weightedroundrobin: fix ticker leak on update (#6655)
Browse files Browse the repository at this point in the history
Authored-by: Antoine Tollenaere <atollena@gmail.com>
  • Loading branch information
ginayeh committed Sep 21, 2023
1 parent 863de73 commit 67a53a6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions balancer/weightedroundrobin/balancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ func (p *picker) start(ctx context.Context) {
}
go func() {
ticker := time.NewTicker(time.Duration(p.cfg.WeightUpdatePeriod))
defer ticker.Stop()
for {
select {
case <-ctx.Done():
Expand Down

0 comments on commit 67a53a6

Please sign in to comment.