node: Gracefully shutdown accountant on exit

This commit is contained in:
tbjump 2023-06-27 17:26:00 +00:00 committed by tbjump
parent e07a750f90
commit cf29f6c410
1 changed files with 1 additions and 0 deletions

View File

@ -165,6 +165,7 @@ func (g *G) Run(rootCtxCancel context.CancelFunc, options ...*GuardianOption) su
if err := g.acct.Start(ctx); err != nil {
logger.Fatal("acct: failed to start accountant", zap.Error(err))
}
defer g.acct.Close()
}
if g.gov != nil {