Reworked Redis set (#8742)

This commit is contained in:
Matteo Biscosi 2024-10-04 16:58:26 +02:00
parent 80089c2856
commit e31842eacc
4 changed files with 29 additions and 30 deletions

View file

@ -305,7 +305,7 @@ local function _lock()
for i = 1, max_lock_attempts do
local value_set = ntop.setnxCache(lock_key, "1", max_lock_duration)
if value_set then
if ntop.getCache(lock_key) == "1" then
return true -- lock acquired
end