builder: fix concurrent map write

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi 2020-04-03 15:33:15 -07:00
parent ff99a93b81
commit 5ad981640f

View file

@ -240,7 +240,9 @@ func (b *Builder) Build(ctx context.Context, opt backend.BuildConfig) (*builder.
} }
defer func() { defer func() {
b.mu.Lock()
delete(b.jobs, buildID) delete(b.jobs, buildID)
b.mu.Unlock()
}() }()
} }