Commit d903a963 authored by Chris O'Haver's avatar Chris O'Haver Committed by GitHub

dont lameduck when reloading (#5472)

Signed-off-by: default avatarChris O'Haver <cohaver@infoblox.com>
parent a6078ddb
......@@ -70,3 +70,15 @@ func (h *health) OnFinalShutdown() error {
h.nlSetup = false
return nil
}
func (h *health) OnReload() error {
if !h.nlSetup {
return nil
}
h.stop()
h.ln.Close()
h.nlSetup = false
return nil
}
......@@ -20,7 +20,7 @@ func setup(c *caddy.Controller) error {
h := &health{Addr: addr, lameduck: lame}
c.OnStartup(h.OnStartup)
c.OnRestart(h.OnFinalShutdown)
c.OnRestart(h.OnReload)
c.OnFinalShutdown(h.OnFinalShutdown)
c.OnRestartFailed(h.OnStartup)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment