1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 13:40:55 +00:00

avoid map-lock delete

This commit is contained in:
JessonChan 2015-11-16 10:31:27 +08:00
parent bc2195b07f
commit d963bb79bd

View File

@ -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)