diff --git a/lib/resty/healthcheck.lua b/lib/resty/healthcheck.lua index e17057ab..16553aa1 100644 --- a/lib/resty/healthcheck.lua +++ b/lib/resty/healthcheck.lua @@ -1587,7 +1587,7 @@ function _M.new(opts) end local cur_time = ngx_now() - for _, checker_obj in ipairs(hcs) do + for _, checker_obj in pairs(hcs) do -- clear targets marked for delayed removal locking_target_list(checker_obj, function(target_list) local removed_targets = {}