Skip to content

Commit

Permalink
balancer/weightedroundrobin: fix ticker leak on update (#6643)
Browse files Browse the repository at this point in the history
  • Loading branch information
atollena authored Sep 18, 2023
1 parent 92f5ba9 commit 1457a96
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 1457a96

Please sign in to comment.