bugfix: check all previously failing upstreams, not just the last one
This commit is contained in:
parent
b9b1ffb1d5
commit
e2c6202324
2 changed files with 16 additions and 21 deletions
|
|
@ -16,12 +16,6 @@ function _M.get_first_value(var)
|
|||
return t[1]
|
||||
end
|
||||
|
||||
function _M.get_last_value(var)
|
||||
local t = _M.split_upstream_var(var) or {}
|
||||
if #t == 0 then return nil end
|
||||
return t[#t]
|
||||
end
|
||||
|
||||
-- http://nginx.org/en/docs/http/ngx_http_upstream_module.html#example
|
||||
-- CAVEAT: nginx is giving out : instead of , so the docs are wrong
|
||||
-- 127.0.0.1:26157 : 127.0.0.1:26157 , ngx.var.upstream_addr
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue