diff options
author | 2018-03-02 17:16:25 -0800 | |
---|---|---|
committer | 2018-03-02 17:16:25 -0800 | |
commit | 6f3a7af5486294c1ca5076e9c56827cd388900e7 (patch) | |
tree | 8120bfccd9ae84d9afc8c4b68ac7be4e49f6b926 /plugin/metrics/metrics.go | |
parent | 5546dbf3c6dc7a5b437f0b41534052395e20f329 (diff) | |
download | coredns-6f3a7af5486294c1ca5076e9c56827cd388900e7.tar.gz coredns-6f3a7af5486294c1ca5076e9c56827cd388900e7.tar.zst coredns-6f3a7af5486294c1ca5076e9c56827cd388900e7.zip |
Metrics reload (#1586)
* wip
* plugin/metrics: fix reload behavior
Fixes #1472
Diffstat (limited to 'plugin/metrics/metrics.go')
-rw-r--r-- | plugin/metrics/metrics.go | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/plugin/metrics/metrics.go b/plugin/metrics/metrics.go index 25d6da488..0c24ffd15 100644 --- a/plugin/metrics/metrics.go +++ b/plugin/metrics/metrics.go @@ -103,13 +103,8 @@ func (m *Metrics) OnStartup() error { return nil } -// OnShutdown tears down the metrics on shutdown and restart. -func (m *Metrics) OnShutdown() error { - if m.ln != nil { - return m.ln.Close() - } - return nil -} +// OnShutdown tears down the metrics listener on shutdown and restart. +func (m *Metrics) OnShutdown() error { return m.ln.Close() } func keys(m map[string]bool) []string { sx := []string{} |