修复OpenFileCache可能无法更新的Bug

This commit is contained in:
刘祥超
2022-03-31 11:47:31 +08:00
parent 9689baccf7
commit 221d00b450
5 changed files with 35 additions and 9 deletions

View File

@@ -45,7 +45,7 @@ func (this *OpenFilePool) Get() (*OpenFile, bool) {
}
func (this *OpenFilePool) Put(file *OpenFile) bool {
if file.version > 0 && file.version != this.version {
if this.version > 0 && file.version > 0 && file.version != this.version {
_ = file.Close()
return false
}