Browse Source

Update redis.go (#27)

master
李正强 无闻 1 year ago
parent
commit
0a0a789bf1
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      redis/redis.go

+ 1
- 1
redis/redis.go View File

@@ -158,7 +158,7 @@ func (p *RedisProvider) Init(maxlifetime int64, configs string) (err error) {
func (p *RedisProvider) Read(sid string) (session.RawStore, error) {
psid := p.prefix + sid
if !p.Exist(sid) {
if err := p.c.Set(psid, "").Err(); err != nil {
if err := p.c.SetEx(psid, p.duration, "").Err(); err != nil {
return nil, err
}
}


Loading…
Cancel
Save