Commit 7c3a9977 authored by xia hao's avatar xia hao Committed by GitHub

poolsize could set to zero

sometimes we may want disable the redis pool
parent 323a1c42
...@@ -128,7 +128,7 @@ func (rp *Provider) SessionInit(maxlifetime int64, savePath string) error { ...@@ -128,7 +128,7 @@ func (rp *Provider) SessionInit(maxlifetime int64, savePath string) error {
} }
if len(configs) > 1 { if len(configs) > 1 {
poolsize, err := strconv.Atoi(configs[1]) poolsize, err := strconv.Atoi(configs[1])
if err != nil || poolsize <= 0 { if err != nil || poolsize < 0 {
rp.poolsize = MaxPoolSize rp.poolsize = MaxPoolSize
} else { } else {
rp.poolsize = poolsize rp.poolsize = poolsize
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment