Skip to content

Commit 5069e87

Browse files
committed
fix: prometheus http deadlocking grpc
1 parent e8e732b commit 5069e87

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ func main() {
2929
grpc_prometheus.Register(s)
3030
http.Handle(Server.MetricsPath, promhttp.Handler())
3131

32-
go log.Fatal(http.ListenAndServe(Server.MetricsAddr, nil))
32+
go func() {
33+
log.Fatal(http.ListenAndServe(Server.MetricsAddr, nil))
34+
}()
3335
}
3436

3537
if err := s.Serve(lis); err != nil {

0 commit comments

Comments
 (0)