added error logging to low level serve method

This commit is contained in:
Todd Gruben 2017-07-10 09:02:21 -05:00
parent 230f419df4
commit 2b27f36dac

View file

@ -162,7 +162,12 @@ func (s *Server) Open() error {
s.Holder.LogOutput = s.LogOutput
// Serve HTTP.
go func() { http.Serve(ln, s.Handler) }()
go func() {
err := http.Serve(ln, s.Handler)
if err != nil {
s.logger().Printf("HTTP handler terminated with error: %s\n", err)
}
}()
// Start background monitoring.
s.wg.Add(3)