Former-commit-id: 5659b6ca274bb51d7de0d079b0e87c0c513540a6
This commit is contained in:
Gerasimos (Makis) Maropoulos 2017-09-30 23:52:32 +03:00
parent 20e2dd694f
commit 7989a2fd72
2 changed files with 14 additions and 16 deletions

View File

@ -49,11 +49,8 @@ func (db *Database) Load(sid string) (storeDB sessions.RemoteStore) {
// fetch the values from this session id and copy-> store them
storeMaybe, err := db.redis.Get(sid)
if err != nil {
golog.Errorf("error while trying to load session values(%s) from redis: %v", sid, err)
return
}
// exists
if err == nil {
storeB, ok := storeMaybe.([]byte)
if !ok {
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
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)
the retrieved value is not a sessions.RemoteStore type, please report that as bug, that should never occur: %v`,
sid, err)
}
}
return