aboutsummaryrefslogtreecommitdiff
path: root/plugin/metrics/metrics.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/metrics/metrics.go')
-rw-r--r--plugin/metrics/metrics.go9
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{}