Merge pull request #199 from tonistiigi/mutable-race

cache: fix race on reloading mutableref
docker-18.09
Akihiro Suda 2017-12-09 17:01:17 +09:00 committed by GitHub
commit d813f6c08d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

2
cache/manager.go vendored
View File

@ -117,7 +117,7 @@ func (cm *cacheManager) get(ctx context.Context, id string, opts ...RefOption) (
}
func (cm *cacheManager) load(ctx context.Context, id string, opts ...RefOption) (*cacheRecord, error) {
if rec, ok := cm.records[id]; ok {
if rec, ok := cm.records[id]; ok && !rec.dead {
return rec, nil
}