mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 09:50:56 +00:00
poolsize could set to zero
sometimes we may want disable the redis pool
This commit is contained in:
parent
323a1c4214
commit
7c3a997735
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user