mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
bw - fix redis error when using sessions and fix redis connection pool not used
This commit is contained in:
parent
d475a4e31e
commit
68b3d67857
2 changed files with 7 additions and 2 deletions
|
|
@ -70,7 +70,8 @@ function clusterstore:initialize(pool)
|
|||
role = "master",
|
||||
sentinels = {}
|
||||
}
|
||||
if pool == nil or pool then
|
||||
self.pool = pool == nil or pool
|
||||
if self.pool then
|
||||
options.connection_options.pool = "bw-redis"
|
||||
options.connection_options.pool_size = tonumber(self.variables["REDIS_KEEPALIVE_POOL"])
|
||||
end
|
||||
|
|
|
|||
|
|
@ -73,7 +73,11 @@ function sessions:init()
|
|||
if value == nil then
|
||||
return self:ret(false, "can't get " .. k .. " variable : " .. err)
|
||||
end
|
||||
redis_vars[k] = value
|
||||
if value == "" then
|
||||
redis_vars[k] = nil
|
||||
else
|
||||
redis_vars[k] = value
|
||||
end
|
||||
end
|
||||
-- Init configuration
|
||||
local config = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue