mirror of
https://github.com/go-kratos/kratos.git
synced 2026-05-22 10:15:24 +02:00
feat(app): app info delivery to stop context (#1649)
This commit is contained in:
@@ -91,7 +91,7 @@ func (a *App) Run() error {
|
|||||||
srv := srv
|
srv := srv
|
||||||
eg.Go(func() error {
|
eg.Go(func() error {
|
||||||
<-ctx.Done() // wait for stop signal
|
<-ctx.Done() // wait for stop signal
|
||||||
sctx, cancel := context.WithTimeout(context.Background(), a.opts.stopTimeout)
|
sctx, cancel := context.WithTimeout(NewContext(context.Background(), a), a.opts.stopTimeout)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
return srv.Stop(sctx)
|
return srv.Stop(sctx)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user