mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-18 00:47:48 +08:00
progress: fix race on pausing progress on debug shell
Current progress writer has a logic of pausing/unpausing the printer and internally recreating internal channels. This conflicts with a change that added sync.Once to Wait to allow it being called multiple times without erroring. In debug shell this could mean that new progress printer showed up in debug shell because it was not closed. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
parent
faa573f484
commit
79a978484d
@ -122,6 +122,7 @@ func NewPrinter(ctx context.Context, out console.File, mode progressui.DisplayMo
|
|||||||
for {
|
for {
|
||||||
pw.status = make(chan *client.SolveStatus)
|
pw.status = make(chan *client.SolveStatus)
|
||||||
pw.done = make(chan struct{})
|
pw.done = make(chan struct{})
|
||||||
|
pw.closeOnce = sync.Once{}
|
||||||
|
|
||||||
pw.logMu.Lock()
|
pw.logMu.Lock()
|
||||||
pw.logSourceMap = map[digest.Digest]interface{}{}
|
pw.logSourceMap = map[digest.Digest]interface{}{}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user