You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if not res then
error("request failed: ".. err)
local ok, err = ngx.timer.at(runtime.conf["UPDATE_FREQUENCY"], stream_query)
set_refreshing(false)
if not ok then
error("Failed to create the timer: " .. (err or "unknown"))
end
end
Edit: to add more context the current code may cause a nil error since the err variable is override by the call to ngx.timer so it best we call the error before we call ngx.timer
The text was updated successfully, but these errors were encountered:
https://github.com/crowdsecurity/lua-cs-bouncer/blob/902f0550235828898cb9540bb9e0d48acd7121de/lib/crowdsec.lua#LL227C1-L236C1
Logic error here should be something like
Edit: to add more context the current code may cause a nil error since the err variable is override by the call to ngx.timer so it best we call the error before we call ngx.timer
The text was updated successfully, but these errors were encountered: