File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -87,12 +87,17 @@ local function create_checker(upstream, healthcheck_parent)
8787 if healthcheck == nil then
8888 healthcheck = require (" resty.healthcheck" )
8989 end
90- local checker = healthcheck .new ({
90+ local checker , err = healthcheck .new ({
9191 name = " upstream#" .. healthcheck_parent .key ,
9292 shm_name = " upstream-healthcheck" ,
9393 checks = upstream .checks ,
9494 })
9595
96+ if not checker then
97+ core .log .error (" fail to create healthcheck instance: " , err )
98+ return
99+ end
100+
96101 local host = upstream .checks and upstream .checks .active and upstream .checks .active .host
97102 local port = upstream .checks and upstream .checks .active and upstream .checks .active .port
98103 for _ , node in ipairs (upstream .nodes ) do
You can’t perform that action at this time.
0 commit comments