mirror of
https://github.com/coredns/coredns.git
synced 2025-11-06 03:56:24 -05:00
mw/health: call Shutdown on FinalShutdown (#1003)
Reloading caddy won't kill the health handler. Only on final shutdown we stop the handler. Currently when reloading CoreDNS with -SIGUSR1 the health handler stops answering - there is a test for this but it doesn't capture whole process reloading, sadly. This PR keeps the handler alive during reloads and only stops on process shutdown.
This commit is contained in:
@@ -47,7 +47,7 @@ func setup(c *caddy.Controller) error {
|
|||||||
})
|
})
|
||||||
|
|
||||||
c.OnStartup(h.Startup)
|
c.OnStartup(h.Startup)
|
||||||
c.OnShutdown(h.Shutdown)
|
c.OnFinalShutdown(h.Shutdown)
|
||||||
|
|
||||||
// Don't do AddMiddleware, as health is not *really* a middleware just a separate webserver running.
|
// Don't do AddMiddleware, as health is not *really* a middleware just a separate webserver running.
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user