Merge pull request #40780 from thaJeztah/19.03_backport_map_sync

[19.03 backport] builder: fix concurrent map write
This commit is contained in:
Brian Goff 2020-04-06 08:56:01 -07:00 committed by GitHub
commit 1e1caccb13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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