mirror of
https://github.com/astaxie/beego.git
synced 2025-07-09 08:00:17 +00:00
avoid map-lock delete
This commit is contained in:
@ -107,7 +107,6 @@ func openFile(filePath string, fi os.FileInfo, acceptEncoding string) (bool, str
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
mapLock.Lock()
|
mapLock.Lock()
|
||||||
delete(staticFileMap, mapKey)
|
|
||||||
defer mapLock.Unlock()
|
defer mapLock.Unlock()
|
||||||
if mapFile, ok = staticFileMap[mapKey]; !ok {
|
if mapFile, ok = staticFileMap[mapKey]; !ok {
|
||||||
file, err := os.Open(filePath)
|
file, err := os.Open(filePath)
|
||||||
|
Reference in New Issue
Block a user