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

poolsize could set to zero

sometimes we may want disable the redis pool
This commit is contained in:
xia hao 2017-03-27 23:34:58 +08:00 committed by GitHub
parent 323a1c4214
commit 7c3a997735

View File

@ -128,7 +128,7 @@ func (rp *Provider) SessionInit(maxlifetime int64, savePath string) error {
}
if len(configs) > 1 {
poolsize, err := strconv.Atoi(configs[1])
if err != nil || poolsize <= 0 {
if err != nil || poolsize < 0 {
rp.poolsize = MaxPoolSize
} else {
rp.poolsize = poolsize