Skip to content

Commit 79a9784

Browse files
committed
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>
1 parent faa573f commit 79a9784

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

util/progress/printer.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ func NewPrinter(ctx context.Context, out console.File, mode progressui.DisplayMo
122122
for {
123123
pw.status = make(chan *client.SolveStatus)
124124
pw.done = make(chan struct{})
125+
pw.closeOnce = sync.Once{}
125126

126127
pw.logMu.Lock()
127128
pw.logSourceMap = map[digest.Digest]interface{}{}

0 commit comments

Comments
 (0)