diff options
author | Unknwon <u@gogs.io> | 2018-12-04 19:36:05 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2018-12-04 19:36:05 -0500 |
commit | 458aadbb10a50948bbc237c5c2ab62d8710d2b4a (patch) | |
tree | 810f6f58172e43aec924250a45daafa2838f0b34 /vendor/github.com/go-macaron/session/redis/redis.go | |
parent | f2ec0d80a81902c20b3dc95908a1d5796148bda9 (diff) |
vendor: update github.com/go-macaron/session
Diffstat (limited to 'vendor/github.com/go-macaron/session/redis/redis.go')
-rw-r--r-- | vendor/github.com/go-macaron/session/redis/redis.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vendor/github.com/go-macaron/session/redis/redis.go b/vendor/github.com/go-macaron/session/redis/redis.go index ca1cf88d..6fe10736 100644 --- a/vendor/github.com/go-macaron/session/redis/redis.go +++ b/vendor/github.com/go-macaron/session/redis/redis.go @@ -81,6 +81,11 @@ func (s *RedisStore) ID() string { // Release releases resource and save data to provider. func (s *RedisStore) Release() error { + // Skip encoding if the data is empty + if len(s.data) == 0 { + return nil + } + data, err := session.EncodeGob(s.data) if err != nil { return err |