优化文件句柄缓存相关代码

This commit is contained in:
GoEdgeLab
2024-03-28 08:52:53 +08:00
parent 6a86503d29
commit e242502948
2 changed files with 11 additions and 0 deletions

View File

@@ -622,6 +622,11 @@ func (this *FileStorage) openWriter(key string, expiredAt int64, status int, hea
return nil, fmt.Errorf("%w (003)", ErrFileIsWriting)
}
// 关闭
if openFileCache != nil {
openFileCache.Close(cachePath)
}
var metaBodySize int64 = -1
var metaHeaderSize = -1
if isNewCreated {