Skip to content

Commit

Permalink
fix: prometheus http deadlocking grpc
Browse files Browse the repository at this point in the history
  • Loading branch information
thebinary committed Aug 12, 2019
1 parent e8e732b commit 5069e87
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 5069e87

Please sign in to comment.