Skip to content

Commit

Permalink
feat(healthcheck) avoid duplication post in rebuild healthcheck scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
oowl authored and locao committed Nov 14, 2022
1 parent 1fe7ac5 commit 728d388
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/resty/healthcheck.lua
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,9 @@ function checker:add_target(ip, port, hostname, is_healthy, hostheader)
end

-- raise event for our newly added target
self:raise_event(self.events[internal_health], ip, port, hostname)
if not found then
self:raise_event(self.events[internal_health], ip, port, hostname)
end

return true
end)
Expand Down

0 comments on commit 728d388

Please sign in to comment.