1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-09-16 09:16:35 +02:00

fix: sctx cause request ctx canceled during graceful shutdown (#3097)

This commit is contained in:
LinEvil
2023-12-01 13:37:42 +08:00
committed by GitHub
parent 396af2d25f
commit abd1d354af

2
app.go
View File

@@ -109,7 +109,7 @@ func (a *App) Run() error {
wg.Add(1)
eg.Go(func() error {
wg.Done() // here is to ensure server start has begun running before register, so defer is not needed
return srv.Start(sctx)
return srv.Start(NewContext(a.opts.ctx, a))
})
}
wg.Wait()