From 002824ef7d6c4a4d6d398329013f2c58609aafea Mon Sep 17 00:00:00 2001 From: Yonghwan SO Date: Sat, 5 Mar 2022 15:08:03 +0900 Subject: [PATCH] already canceled context should not be used for shutdown --- server.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server.go b/server.go index 2c133cac5..b35bbbc57 100644 --- a/server.go +++ b/server.go @@ -69,9 +69,10 @@ func (a *App) Serve(srvs ...servers.Server) error { } a.Logger.Info("Shutting down servers") + graceful := context.Background() for _, s := range srvs { - if err := s.Shutdown(ctx); err != nil { - a.Logger.Warn("shutting down server: ", err) + if err := s.Shutdown(graceful); err != nil { + a.Logger.Error("shutting down server: ", err) } }