mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 20:00:55 +00:00
avoid map-lock delete
This commit is contained in:
parent
bc2195b07f
commit
d963bb79bd
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user