summaryrefslogtreecommitdiff
path: root/store.go
diff options
context:
space:
mode:
Diffstat (limited to 'store.go')
-rw-r--r--store.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/store.go b/store.go
index 24b466f..13cd1db 100644
--- a/store.go
+++ b/store.go
@@ -224,6 +224,8 @@ func (s *FilesystemStore) save(session *Session) error {
// load reads a file and decodes its content into session.Values.
func (s *FilesystemStore) load(session *Session) error {
filename := s.path + "session_" + session.ID
+ fileMutex.RLock()
+ defer fileMutex.RUnlock()
fdata, err := ioutil.ReadFile(filename)
if err != nil {
return err