From e2c6843a819102d9a5cc880227d786d7d77be47a Mon Sep 17 00:00:00 2001 From: Juergen Hoetzel Date: Sun, 23 Apr 2017 12:31:45 +0200 Subject: [PATCH] Report ListenAndServe errors --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 296b66b..0d3f641 100644 --- a/main.go +++ b/main.go @@ -20,6 +20,7 @@ import ( "net/http" "sync" "time" + "log" "github.com/prometheus/client_golang/prometheus" @@ -323,5 +324,5 @@ func main() { prometheus.MustRegister(collect_errors) http.Handle("/metrics", prometheus.Handler()) - http.ListenAndServe(*flag_addr, nil) + log.Fatal(http.ListenAndServe(*flag_addr, nil)) }