From f68702a8c2b354395782b190fbeae89e08c3069a Mon Sep 17 00:00:00 2001 From: hoslo <952572463@qq.com> Date: Tue, 15 Mar 2022 11:02:10 +0800 Subject: [PATCH] fix: graceful shutdown (#1873) --- app.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app.go b/app.go index aebd6c563..ae93ab1af 100644 --- a/app.go +++ b/app.go @@ -98,7 +98,8 @@ func (a *App) Run() error { wg.Add(1) eg.Go(func() error { wg.Done() - return srv.Start(ctx) + tctx := NewContext(context.Background(), a) + return srv.Start(tctx) }) } wg.Wait()