Skip to content

Commit

Permalink
balancer/weightedroundrobin: fix ticker leak on update (grpc#6643)
Browse files Browse the repository at this point in the history
  • Loading branch information
atollena authored and ginayeh committed Sep 21, 2023
1 parent 863de73 commit e85a8f1
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 e85a8f1

Please sign in to comment.