1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-03-17 21:07:54 +02:00

fix: clear err after app stop err handling (#3146)

This commit is contained in:
lawlielt 2024-01-05 11:06:12 +08:00 committed by GitHub
parent 21de240843
commit 34d9666e0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

1
app.go
View File

@ -139,6 +139,7 @@ func (a *App) Run() error {
if err = eg.Wait(); err != nil && !errors.Is(err, context.Canceled) {
return err
}
err = nil
for _, fn := range a.opts.afterStop {
err = fn(sctx)
}