优化OpenFileCache

This commit is contained in:
刘祥超
2022-12-05 11:16:04 +08:00
parent 1a05f56149
commit 87bc1a7e03
2 changed files with 24 additions and 2 deletions

View File

@@ -129,6 +129,9 @@ func (this *OpenFileCache) Close(filename string) {
pool, ok := this.poolMap[filename]
if ok {
// 设置关闭状态
pool.SetClosing()
delete(this.poolMap, filename)
this.poolList.Remove(pool.linkItem)
_ = this.watcher.Remove(filename)