Skip to content

Commit

Permalink
tryEarlyRefresh: select on b.ctx.Done()
Browse files Browse the repository at this point in the history
b.done is closed after b.ctx.Done() and here we want to quit asap.
  • Loading branch information
vbauerster committed Aug 14, 2024
1 parent 38b91ac commit 2a53dfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bar.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ func (b *Bar) tryEarlyRefresh(renderReq chan<- time.Time) {
for {
select {
case renderReq <- time.Now():
case <-b.done:
case <-b.ctx.Done():
return
}
}
Expand Down

0 comments on commit 2a53dfb

Please sign in to comment.