From 74559e2f01b030886ad1aa6caaa7bf7afd61e8cc Mon Sep 17 00:00:00 2001 From: Brian Fox Date: Thu, 23 Jan 2020 09:24:05 -0800 Subject: [PATCH] fix(balancer) fix check to see if response was produced by upstream (#5493) --- kong/runloop/handler.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kong/runloop/handler.lua b/kong/runloop/handler.lua index 3d62730a97b..513ded40061 100644 --- a/kong/runloop/handler.lua +++ b/kong/runloop/handler.lua @@ -1321,7 +1321,7 @@ return { -- If response was produced by an upstream (ie, not by a Kong plugin) -- Report HTTP status for health checks local balancer_data = ctx.balancer_data - if balancer_data and balancer_data.balancer and balancer_data.ip then + if balancer_data and balancer_data.balancer_handle then local status = ngx.status if status == 504 then balancer_data.balancer.report_timeout(balancer_data.balancer_handle)