Merge pull request #10956 from ioito/hotfix/qx-host-worker-lock

fix: avoid host worker is locked when image cache is deleted
This commit is contained in:
yunion-ci-robot
2021-04-28 09:56:28 +08:00
committed by GitHub
@@ -205,6 +205,10 @@ func (l *SLocalImageCache) fetch(ctx context.Context, zone, srcUrl, format strin
defer l.cond.L.Unlock()
l.Desc = l.remoteFile.GetInfo()
if l.Desc == nil {
l.remoteFile = nil
return false
}
l.Size = l.GetSize() / 1024 / 1024
l.Desc.Id = l.imageId
l.remoteFile = nil