mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
builder: fix cancellation context issue
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
parent
4cdb6853dc
commit
2567dd9afc
1 changed files with 2 additions and 1 deletions
|
@ -137,7 +137,8 @@ func (b *Builder) Build(ctx context.Context, opt backend.BuildConfig) (*builder.
|
|||
b.jobs[buildID] = newBuildJob()
|
||||
}
|
||||
j := b.jobs[buildID]
|
||||
ctx, cancel := context.WithCancel(ctx)
|
||||
var cancel func()
|
||||
ctx, cancel = context.WithCancel(ctx)
|
||||
j.cancel = cancel
|
||||
b.mu.Unlock()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue