setup: on shutdown, close the client connection

This commit is contained in:
Julien Balestra 2020-12-18 23:08:59 +01:00 committed by Jordan Whited
parent ce787925be
commit fd4b7d8879

View File

@ -40,6 +40,7 @@ func setup(c *caddy.Controller) error {
fmt.Errorf("error constructing wgctrl client: %v",
err))
}
c.OnFinalShutdown(client.Close)
// Add the Plugin to CoreDNS, so Servers can use it in their plugin chain.
dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler {