From d963bb79bd20c74495132d89b9dd84c051377c87 Mon Sep 17 00:00:00 2001 From: JessonChan Date: Mon, 16 Nov 2015 10:31:27 +0800 Subject: [PATCH] avoid map-lock delete --- staticfile.go | 1 - 1 file changed, 1 deletion(-) diff --git a/staticfile.go b/staticfile.go index 5dae81ac..80162e74 100644 --- a/staticfile.go +++ b/staticfile.go @@ -107,7 +107,6 @@ func openFile(filePath string, fi os.FileInfo, acceptEncoding string) (bool, str } } mapLock.Lock() - delete(staticFileMap, mapKey) defer mapLock.Unlock() if mapFile, ok = staticFileMap[mapKey]; !ok { file, err := os.Open(filePath)