From 0af43695de3e430f0ac4ca893ab1b29c8935a6df Mon Sep 17 00:00:00 2001 From: Fabian Reinartz Date: Thu, 10 Aug 2017 14:48:31 +0200 Subject: [PATCH] web: log error missages on serving --- web/web.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/web/web.go b/web/web.go index 74a733d2d..d6d18c966 100644 --- a/web/web.go +++ b/web/web.go @@ -346,8 +346,16 @@ func (h *Handler) Run(ctx context.Context) error { ReadTimeout: h.options.ReadTimeout, } - go httpSrv.Serve(httpl) - go grpcSrv.Serve(grpcl) + go func() { + if err := httpSrv.Serve(httpl); err != nil { + log.With("err", err).Warnf("error serving HTTP") + } + }() + go func() { + if err := grpcSrv.Serve(grpcl); err != nil { + log.With("err", err).Warnf("error serving HTTP") + } + }() return m.Serve() }