This is an automated email from the ASF dual-hosted git repository. membphis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push: new e2f1fc6 chore: capitalize the constant (#3672) e2f1fc6 is described below commit e2f1fc6a7b7da070cfd253c8854358473193237c Author: 罗泽轩 <spacewander...@gmail.com> AuthorDate: Sat Feb 27 20:33:30 2021 +0800 chore: capitalize the constant (#3672) See https://github.com/apache/apisix/pull/3629#discussion_r582423351 --- apisix/upstream.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apisix/upstream.lua b/apisix/upstream.lua index 7a363be..6ae81c0 100644 --- a/apisix/upstream.lua +++ b/apisix/upstream.lua @@ -26,8 +26,8 @@ local is_http = ngx.config.subsystem == "http" local upstreams local healthcheck -local http_code_upstream_unavailable = ngx.HTTP_SERVICE_UNAVAILABLE +local HTTP_CODE_UPSTREAM_UNAVAILABLE = 503 local _M = {} @@ -216,7 +216,7 @@ function _M.set_by_route(route, api_ctx) local new_nodes, err = dis.nodes(up_conf.service_name) if not new_nodes then - return http_code_upstream_unavailable, "no valid upstream node: " .. (err or "nil") + return HTTP_CODE_UPSTREAM_UNAVAILABLE, "no valid upstream node: " .. (err or "nil") end local same = upstream_util.compare_upstream_node(up_conf, new_nodes) @@ -243,7 +243,7 @@ function _M.set_by_route(route, api_ctx) local nodes_count = up_conf.nodes and #up_conf.nodes or 0 if nodes_count == 0 then - return http_code_upstream_unavailable, "no valid upstream node" + return HTTP_CODE_UPSTREAM_UNAVAILABLE, "no valid upstream node" end if not is_http then