From 9ac2a05d583b7b47fc904c9a5faa281f6befeb05 Mon Sep 17 00:00:00 2001 From: Thomas Anderson Date: Mon, 8 May 2023 04:27:43 -0400 Subject: [PATCH] fix: metrics listener address sanitization (#1774) In commit 3475762 from PR #1678 the restrictNetwork function was called twice for the metrics listening address only, which leads to 0.0.0.0 listeners not working properly for the metrics server. --- internal/core/metrics.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/core/metrics.go b/internal/core/metrics.go index 29c1279a..48b7a6d8 100644 --- a/internal/core/metrics.go +++ b/internal/core/metrics.go @@ -43,7 +43,7 @@ func newMetrics( readTimeout conf.StringDuration, parent metricsParent, ) (*metrics, error) { - ln, err := net.Listen(restrictNetwork(restrictNetwork("tcp", address))) + ln, err := net.Listen(restrictNetwork("tcp", address)) if err != nil { return nil, err }