mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 07:30:55 +00:00
Fixed error handling in memcache sessions
This commit is contained in:
parent
1b6edafc96
commit
1dea80d4ea
@ -128,9 +128,12 @@ func (rp *MemProvider) SessionRead(sid string) (session.Store, error) {
|
||||
}
|
||||
}
|
||||
item, err := client.Get(sid)
|
||||
if err != nil && err == memcache.ErrCacheMiss {
|
||||
rs := &SessionStore{sid: sid, values: make(map[interface{}]interface{}), maxlifetime: rp.maxlifetime}
|
||||
return rs, nil
|
||||
if err != nil {
|
||||
if err == memcache.ErrCacheMiss {
|
||||
rs := &SessionStore{sid: sid, values: make(map[interface{}]interface{}), maxlifetime: rp.maxlifetime}
|
||||
return rs, nil
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
var kv map[interface{}]interface{}
|
||||
if len(item.Value) == 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user