summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHank Shen <swhbox@foxmail.com>2019-05-02 07:31:38 +0300
committerHank Shen <swhbox@foxmail.com>2019-05-02 07:31:38 +0300
commitc41aec4c78c6181e3d9b1d4f4333c26c6c7aeed1 (patch)
tree228bbf08b3045c1f769d3d49f63c578c0fa56f53
parentd034976064c535b4ff1c2a3af0efc1b2a84af49a (diff)
update
-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()