Properly log and handle HTTP server error (#2685)

This commit is contained in:
Hsien-Tang Kao
2019-06-12 16:58:49 -07:00
committed by Preston Van Loon
parent c66186b54a
commit 3a167e54b5
4 changed files with 5 additions and 9 deletions

View File

@@ -74,7 +74,7 @@ func main() {
http.HandleFunc("/metrics", MetricsHTTP)
http.HandleFunc("/reload", ReloadHTTP)
panic(http.ListenAndServe(fmt.Sprintf("0.0.0.0:%d", *port), nil))
log.Fatal(http.ListenAndServe(fmt.Sprintf("0.0.0.0:%d", *port), nil))
}
// Watching address wrapper