Skip to content

Commit 67a53a6

Browse files
authored
balancer/weightedroundrobin: fix ticker leak on update (#6655)
Authored-by: Antoine Tollenaere <[email protected]>
1 parent 863de73 commit 67a53a6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

balancer/weightedroundrobin/balancer.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ func (p *picker) start(ctx context.Context) {
369369
}
370370
go func() {
371371
ticker := time.NewTicker(time.Duration(p.cfg.WeightUpdatePeriod))
372+
defer ticker.Stop()
372373
for {
373374
select {
374375
case <-ctx.Done():

0 commit comments

Comments
 (0)