diff options
author | 2018-10-09 22:50:30 +0300 | |
---|---|---|
committer | 2018-10-09 20:50:30 +0100 | |
commit | 298b860a97481630ec65698ab0465675bf58b43a (patch) | |
tree | 4f93866cde0a2db4d8cc814cc230ba8d6075e11e /plugin/forward/proxy.go | |
parent | cbcc38bcb539ee6e47b1f47d058db96ebcbcdfc1 (diff) | |
download | coredns-298b860a97481630ec65698ab0465675bf58b43a.tar.gz coredns-298b860a97481630ec65698ab0465675bf58b43a.tar.zst coredns-298b860a97481630ec65698ab0465675bf58b43a.zip |
plugin/forward: fix healthchecker crash (#2165)
Diffstat (limited to 'plugin/forward/proxy.go')
-rw-r--r-- | plugin/forward/proxy.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugin/forward/proxy.go b/plugin/forward/proxy.go index 453dd015b..fbe79cd69 100644 --- a/plugin/forward/proxy.go +++ b/plugin/forward/proxy.go @@ -50,6 +50,11 @@ func (p *Proxy) SetExpire(expire time.Duration) { p.transport.SetExpire(expire) // Healthcheck kicks of a round of health checks for this proxy. func (p *Proxy) Healthcheck() { + if p.health == nil { + log.Warning("No healthchecker") + return + } + p.probe.Do(func() error { return p.health.Check(p) }) |