fix: in disk cache readCacheFileStream should closed upon return (#16138)

This commit is contained in:
jiuker
2022-12-04 18:28:10 +08:00
committed by GitHub
parent d6351879f3
commit 6086f45d25

View File

@@ -354,6 +354,7 @@ func migrateCacheData(ctx context.Context, c *diskCache, bucket, object, oldfile
if err != nil {
return err
}
defer readCloser.Close()
var reader io.Reader = readCloser
actualSize := uint64(st.Size())