1
0
mirror of https://github.com/astaxie/beego.git synced 2024-06-18 13:24:14 +00:00

fix sesseion redis db error

This commit is contained in:
astaxie 2015-05-13 21:20:50 +08:00
parent 4138fe0217
commit 2dca48f26e

View File

@ -145,7 +145,7 @@ func (rp *RedisProvider) SessionInit(maxlifetime int64, savePath string) error {
rp.password = configs[2]
}
if len(configs) > 3 {
dbnum, err := strconv.Atoi(configs[1])
dbnum, err := strconv.Atoi(configs[3])
if err != nil || dbnum < 0 {
rp.dbNum = 0
} else {