1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-25 20:10:56 +00:00

Merge pull request #2533 from cnxh/redis-session-poolsize

redis poolsize could set to zero
This commit is contained in:
astaxie 2017-03-29 10:00:28 +08:00 committed by GitHub
commit f49f3f92ec

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