Skip to content

Commit

Permalink
fix(admin) localize variables
Browse files Browse the repository at this point in the history
  • Loading branch information
StarlightIbuki authored and dndx committed Mar 9, 2022
1 parent 179aadc commit b160933
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kong/db/declarative/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ local pairs = pairs
local ngx_socket_tcp = ngx.socket.tcp
local yield = require("kong.tools.utils").yield
local marshall = require("kong.db.declarative.marshaller").marshall
loacl min = math.min


local REMOVE_FIRST_LINE_PATTERN = "^[^\n]+\n(.+)$"
Expand Down Expand Up @@ -931,7 +932,7 @@ do
local ok, err = kong_shm:add(DECLARATIVE_LOCK_KEY, 0, DECLARATIVE_LOCK_TTL)
if not ok then
if err == "exists" then
local ttl = math.min(ngx.shared.kong:ttl(DECLARATIVE_LOCK_KEY), DECLARATIVE_RETRY_TTL_MAX)
local ttl = min(kong_shm:ttl(DECLARATIVE_LOCK_KEY), DECLARATIVE_RETRY_TTL_MAX)
return nil, "busy", ttl
end

Expand Down

0 comments on commit b160933

Please sign in to comment.