Log error when ListenAndServe fails

This commit is contained in:
Ben Schumacher 2015-05-19 15:26:35 -06:00
parent ac78a60620
commit 8d5910862e

View file

@ -177,7 +177,11 @@ func main() {
http.Handle("/static/", static()) http.Handle("/static/", static())
http.Handle("/", r) http.Handle("/", r)
http.ListenAndServe(settings.Server.Addr, nil)
err = http.ListenAndServe(settings.Server.Addr, nil)
if err != nil {
log.Error("Cannot start server: ", err)
}
} }
// static is a helper function that will setup handlers // static is a helper function that will setup handlers