From 8d5910862e89e61c916ab0cfd7b915307e839a2c Mon Sep 17 00:00:00 2001 From: Ben Schumacher Date: Tue, 19 May 2015 15:26:35 -0600 Subject: [PATCH] Log error when ListenAndServe fails --- cmd/drone-server/drone.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/drone-server/drone.go b/cmd/drone-server/drone.go index 96169bd0..3fe21ecd 100644 --- a/cmd/drone-server/drone.go +++ b/cmd/drone-server/drone.go @@ -177,7 +177,11 @@ func main() { http.Handle("/static/", static()) 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