fix tcp 502 error for parse tcp backend data

This commit is contained in:
lijie 2023-06-14 10:26:15 +08:00 committed by k8s-infra-cherrypick-robot
parent 0853562bc9
commit a8749d4fec

View file

@ -38,10 +38,10 @@ function _M.call()
return
end
local _, err = cjson.decode(backends)
local _, backends_err = cjson.decode(backends)
if err then
ngx.log(ngx.ERR, "could not parse backends data: ", err)
if backends_err then
ngx.log(ngx.ERR, "could not parse backends data: ", backends_err)
return
end