mirror of
https://github.com/kataras/iris.git
synced 2025-02-02 15:30:36 +01:00
Former-commit-id: 5659b6ca274bb51d7de0d079b0e87c0c513540a6
This commit is contained in:
parent
20e2dd694f
commit
7989a2fd72
|
@ -49,11 +49,8 @@ func (db *Database) Load(sid string) (storeDB sessions.RemoteStore) {
|
||||||
|
|
||||||
// fetch the values from this session id and copy-> store them
|
// fetch the values from this session id and copy-> store them
|
||||||
storeMaybe, err := db.redis.Get(sid)
|
storeMaybe, err := db.redis.Get(sid)
|
||||||
if err != nil {
|
// exists
|
||||||
golog.Errorf("error while trying to load session values(%s) from redis: %v", sid, err)
|
if err == nil {
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
storeB, ok := storeMaybe.([]byte)
|
storeB, ok := storeMaybe.([]byte)
|
||||||
if !ok {
|
if !ok {
|
||||||
golog.Errorf("something wrong, store should be stored as []byte but stored as %#v", storeMaybe)
|
golog.Errorf("something wrong, store should be stored as []byte but stored as %#v", storeMaybe)
|
||||||
|
@ -63,8 +60,9 @@ func (db *Database) Load(sid string) (storeDB sessions.RemoteStore) {
|
||||||
storeDB, err = sessions.DecodeRemoteStore(storeB) // decode the whole value, as a remote store
|
storeDB, err = sessions.DecodeRemoteStore(storeB) // decode the whole value, as a remote store
|
||||||
if err != nil {
|
if err != nil {
|
||||||
golog.Errorf(`error while trying to load session values(%s) from redis:
|
golog.Errorf(`error while trying to load session values(%s) from redis:
|
||||||
the retrieved value is not a sessions.RemoteStore type, please report that as bug, that should never occur`,
|
the retrieved value is not a sessions.RemoteStore type, please report that as bug, that should never occur: %v`,
|
||||||
sid)
|
sid, err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue
Block a user