aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--store.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/store.go b/store.go
index 13d2040..30ecfdd 100644
--- a/store.go
+++ b/store.go
@@ -220,6 +220,9 @@ func (s *FilesystemStore) Save(ctx echo.Context,
// delete session file
func (s *FilesystemStore) erase(session *Session) error {
+ if len(session.ID) == 0 {
+ return nil
+ }
filename := filepath.Join(s.path, "session_"+session.ID)
fileMutex.RLock()
defer fileMutex.RUnlock()