diff --git a/lib/resty/healthcheck.lua b/lib/resty/healthcheck.lua index 739301b1..b04b63ef 100644 --- a/lib/resty/healthcheck.lua +++ b/lib/resty/healthcheck.lua @@ -1340,7 +1340,7 @@ function _M.new(opts) assert(self.shm, ("no shm found by name '%s'"):format(opts.shm_name)) -- other properties - self.targets = nil -- list of targets, initially loaded, maintained by events + self.targets = {} -- list of targets, initially loaded, maintained by events self.events = nil -- hash table with supported events (prevent magic strings) self.stopping = true -- flag to indicate to timers to stop checking self.timer_count = 0 -- number of running timers