diff --git a/session/sess_file.go b/session/sess_file.go index 0758d6b4..53e19811 100644 --- a/session/sess_file.go +++ b/session/sess_file.go @@ -78,6 +78,8 @@ func (fs *FileSessionStore) SessionID() string { // SessionRelease Write file session to local file with Gob string func (fs *FileSessionStore) SessionRelease(w http.ResponseWriter) { + filepder.lock.Lock() + defer filepder.lock.Unlock() b, err := EncodeGob(fs.values) if err != nil { SLogger.Println(err)