mirror of
https://github.com/jwhited/wgsd.git
synced 2025-01-18 22:09:34 +08:00
setup: on shutdown, close the client connection
This commit is contained in:
parent
ce787925be
commit
fd4b7d8879
1
setup.go
1
setup.go
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user