mirror of
https://github.com/coredns/coredns.git
synced 2025-12-17 23:55:10 -05:00
middleware/proxy: Kill goroutines on stop (#646)
* middleware/proxy: Kill goroutines on stop
Ports caddy's 59bf71c293
Excludes the proxy_test.go test part though.
Fixes #644
* Add tests
This commit is contained in:
@@ -37,6 +37,8 @@ func setup(c *caddy.Controller) error {
|
||||
c.OnShutdown(func() error {
|
||||
return u.Exchanger().OnShutdown(P)
|
||||
})
|
||||
// Register shutdown handlers.
|
||||
c.OnShutdown(u.Stop)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user