diff options
Diffstat (limited to 'plugin/metrics/metrics.go')
-rw-r--r-- | plugin/metrics/metrics.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugin/metrics/metrics.go b/plugin/metrics/metrics.go index 2b165e5b9..ddadd7aca 100644 --- a/plugin/metrics/metrics.go +++ b/plugin/metrics/metrics.go @@ -10,6 +10,7 @@ import ( "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/plugin/metrics/vars" + "github.com/coredns/coredns/plugin/pkg/reuseport" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" @@ -95,7 +96,7 @@ func (m *Metrics) ZoneNames() []string { // OnStartup sets up the metrics on startup. func (m *Metrics) OnStartup() error { - ln, err := net.Listen("tcp", m.Addr) + ln, err := reuseport.Listen("tcp", m.Addr) if err != nil { log.Errorf("Failed to start metrics handler: %s", err) return err |