feat(app): app info delivery to stop context (#1649)

pull/1651/head
Wimi Yuan 3 years ago committed by GitHub
parent 27cfec93d6
commit 2acede53f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app.go

@ -91,7 +91,7 @@ func (a *App) Run() error {
srv := srv
eg.Go(func() error {
<-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()
return srv.Stop(sctx)
})

Loading…
Cancel
Save