mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 02:31:04 +01:00
Former-commit-id: 5659b6ca274bb51d7de0d079b0e87c0c513540a6
This commit is contained in:
parent
20e2dd694f
commit
7989a2fd72
|
@ -227,7 +227,7 @@ Bombarding http://localhost:5000/api/values/5 with 1000000 requests using 125 co
|
|||
1000000 / 1000000 [=======================================================================================] 100.00% 1m25s
|
||||
Done!
|
||||
Statistics Avg Stdev Max
|
||||
Reqs/sec 11665.30 628.41 21978
|
||||
Reqs/sec 11665.30 628.41 21978
|
||||
Latency 10.72ms 1.45ms 112.10ms
|
||||
HTTP codes:
|
||||
1xx - 0, 2xx - 1000000, 3xx - 0, 4xx - 0, 5xx - 0
|
||||
|
|
|
@ -49,22 +49,20 @@ 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)
|
||||
return
|
||||
}
|
||||
|
||||
storeB, ok := storeMaybe.([]byte)
|
||||
if !ok {
|
||||
golog.Errorf("something wrong, store should be stored as []byte but stored as %#v", storeMaybe)
|
||||
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)
|
||||
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: %v`,
|
||||
sid, err)
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue
Block a user