Skip to content

Commit

Permalink
fix(healthchecks) get rid of bogus error messages
Browse files Browse the repository at this point in the history
Whenever an HTTP status that was not tracked by either healthy or
unhealthy lists was produced, we were logging a `failed reporting
status: nil` message. This commit fixes that.
  • Loading branch information
hishamhm committed Feb 21, 2018
1 parent c5121bb commit c8eb5ae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kong/core/balancer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -253,17 +253,17 @@ do
healthcheckers[balancer] = healthchecker

balancer.report_http_status = function(ip, port, status)
local ok, err = healthchecker:report_http_status(ip, port, status,
local _, err = healthchecker:report_http_status(ip, port, status,
"passive")
if not ok then
if err then
log(ERR, "[healthchecks] failed reporting status: ", err)
end
end

balancer.report_tcp_failure = function(ip, port)
local ok, err = healthchecker:report_tcp_failure(ip, port, nil,
local _, err = healthchecker:report_tcp_failure(ip, port, nil,
"passive")
if not ok then
if err then
log(ERR, "[healthchecks] failed reporting status: ", err)
end
end
Expand Down

0 comments on commit c8eb5ae

Please sign in to comment.