Skip to content

Commit

Permalink
bw - fix redis error when using sessions and fix redis connection poo…
Browse files Browse the repository at this point in the history
…l not used
  • Loading branch information
fl0ppy-d1sk committed Jan 4, 2024
1 parent d475a4e commit 68b3d67
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/bw/lua/bunkerweb/clusterstore.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion src/common/core/sessions/sessions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 68b3d67

Please sign in to comment.