From 458aadbb10a50948bbc237c5c2ab62d8710d2b4a Mon Sep 17 00:00:00 2001 From: Unknwon Date: Tue, 4 Dec 2018 19:36:05 -0500 Subject: vendor: update github.com/go-macaron/session --- vendor/github.com/go-macaron/session/file.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'vendor/github.com/go-macaron/session/file.go') diff --git a/vendor/github.com/go-macaron/session/file.go b/vendor/github.com/go-macaron/session/file.go index 9bbc7aed..64b47f2b 100644 --- a/vendor/github.com/go-macaron/session/file.go +++ b/vendor/github.com/go-macaron/session/file.go @@ -81,6 +81,11 @@ func (s *FileStore) Release() error { s.p.lock.Lock() defer s.p.lock.Unlock() + // Skip encoding if the data is empty + if len(s.data) == 0 { + return nil + } + data, err := EncodeGob(s.data) if err != nil { return err -- cgit v1.2.3