mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 19:10:54 +00:00
Merge pull request #3456 from japettyjohn/master
Fix bug in memcache sessions
This commit is contained in:
commit
5fe19d639f
@ -128,9 +128,12 @@ func (rp *MemProvider) SessionRead(sid string) (session.Store, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
item, err := client.Get(sid)
|
item, err := client.Get(sid)
|
||||||
if err != nil && err == memcache.ErrCacheMiss {
|
if err != nil {
|
||||||
rs := &SessionStore{sid: sid, values: make(map[interface{}]interface{}), maxlifetime: rp.maxlifetime}
|
if err == memcache.ErrCacheMiss {
|
||||||
return rs, nil
|
rs := &SessionStore{sid: sid, values: make(map[interface{}]interface{}), maxlifetime: rp.maxlifetime}
|
||||||
|
return rs, nil
|
||||||
|
}
|
||||||
|
return nil, err
|
||||||
}
|
}
|
||||||
var kv map[interface{}]interface{}
|
var kv map[interface{}]interface{}
|
||||||
if len(item.Value) == 0 {
|
if len(item.Value) == 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user