From 5069e87a2e800516f28b6a753bdf0719ac270a8d Mon Sep 17 00:00:00 2001 From: thebinary Date: Mon, 12 Aug 2019 16:38:03 +0545 Subject: [PATCH] fix: prometheus http deadlocking grpc --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 8d72d96..05143e8 100644 --- a/main.go +++ b/main.go @@ -29,7 +29,9 @@ func main() { grpc_prometheus.Register(s) http.Handle(Server.MetricsPath, promhttp.Handler()) - go log.Fatal(http.ListenAndServe(Server.MetricsAddr, nil)) + go func() { + log.Fatal(http.ListenAndServe(Server.MetricsAddr, nil)) + }() } if err := s.Serve(lis); err != nil {