cache: fix race on reloading mutableref
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>docker-18.09
parent
41cd660444
commit
d4a82e4584
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue