mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 10:41:03 +01:00
My second mistake on redis session db because I'm not personally use redis, so I'm waiting for redis users to find these type of errors inside it, such as @sy264115809 Former-commit-id: df84348df7509c0f863f41f01de6ed6db6e8133e
This commit is contained in:
parent
40f79c1f19
commit
3ec5ff58c9
|
@ -54,14 +54,19 @@ func (db *Database) Load(sid string) (storeDB sessions.RemoteStore) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
storeDB, ok := storeMaybe.(sessions.RemoteStore)
|
storeB, ok := storeMaybe.([]byte)
|
||||||
if !ok {
|
if !ok {
|
||||||
golog.Errorf(`error while trying to load session values(%s) from redis:
|
golog.Errorf("something wrong, store should be stored as []byte but stored as %#v", storeMaybe)
|
||||||
the retrieved value is not a sessions.RemoteStore type, please report that as bug, it should never occur`,
|
|
||||||
sid)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
storeDB, err = sessions.DecodeRemoteStore(storeB) // decode the whole value, as a remote store
|
||||||
|
if err != nil {
|
||||||
|
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`,
|
||||||
|
sid)
|
||||||
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user