Skip to content

Commit

Permalink
fix(healthcheck): only one_loop is needed in the passive health check…
Browse files Browse the repository at this point in the history
… report (#4116)

Co-authored-by: Ben0625 <Ben0625@github.com>
Co-authored-by: spacewander <spacewanderlzx@gmail.com>
  • Loading branch information
3 people authored Apr 26, 2021
1 parent 8b4a36b commit dba0176
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions apisix/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -615,13 +615,11 @@ local function healthcheck_passive(api_ctx)
end

for i, status in ipairs(http_statuses) do
for i, status in ipairs(http_statuses) do
if resp_status == status then
checker:report_http_status(api_ctx.balancer_ip,
port or api_ctx.balancer_port,
host,
resp_status)
end
if resp_status == status then
checker:report_http_status(api_ctx.balancer_ip,
port or api_ctx.balancer_port,
host,
resp_status)
end
end
end
Expand Down

0 comments on commit dba0176

Please sign in to comment.