bugfix: Each upstream service only needs to create a health check instance, otherwise each work will periodically detect the upstream service (#586)

每个上游服务只需要创建一个健康检查实例,否则每个work都会定时探活上游服务
This commit is contained in:
buhejiudewangxiansheng 2019-09-24 18:09:13 +08:00 committed by YuanSheng Wang
parent 03f5029970
commit 14a31a8dc1

View File

@ -73,7 +73,7 @@ end
local function create_checker(upstream, healthcheck_parent) local function create_checker(upstream, healthcheck_parent)
local checker = healthcheck.new({ local checker = healthcheck.new({
name = "upstream#" .. tostring(upstream), name = "upstream#" .. healthcheck_parent.key,
shm_name = "upstream-healthcheck", shm_name = "upstream-healthcheck",
checks = upstream.checks, checks = upstream.checks,
}) })