Skip to content

Commit b8294e9

Browse files
authored
Merge pull request moby#4008 from alexcb/acb/pullprogress-data-race
pullprogress data race
2 parents fe81c0b + 6228274 commit b8294e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

util/pull/pullprogress/progress.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ func trackProgress(ctx context.Context, desc ocispecs.Descriptor, manager PullMa
9393

9494
ticker := time.NewTicker(150 * time.Millisecond)
9595
defer ticker.Stop()
96-
go func() {
96+
go func(ctx context.Context) {
9797
<-ctx.Done()
9898
ticker.Stop()
99-
}()
99+
}(ctx)
100100

101101
pw, _, _ := progress.NewFromContext(ctx)
102102
defer pw.Close()

0 commit comments

Comments
 (0)