From 2a53dfb3e391ea408ed51f3733028e201cd2bcc8 Mon Sep 17 00:00:00 2001 From: Vladimir Bauer <vbauerster@gmail.com> Date: Thu, 15 Aug 2024 00:37:12 +0500 Subject: [PATCH] tryEarlyRefresh: select on b.ctx.Done() b.done is closed after b.ctx.Done() and here we want to quit asap. --- bar.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bar.go b/bar.go index ef371f43..3a016b54 100644 --- a/bar.go +++ b/bar.go @@ -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 } }