node: Gracefully shutdown accountant on exit
This commit is contained in:
parent
e07a750f90
commit
cf29f6c410
|
@ -165,6 +165,7 @@ func (g *G) Run(rootCtxCancel context.CancelFunc, options ...*GuardianOption) su
|
||||||
if err := g.acct.Start(ctx); err != nil {
|
if err := g.acct.Start(ctx); err != nil {
|
||||||
logger.Fatal("acct: failed to start accountant", zap.Error(err))
|
logger.Fatal("acct: failed to start accountant", zap.Error(err))
|
||||||
}
|
}
|
||||||
|
defer g.acct.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
if g.gov != nil {
|
if g.gov != nil {
|
||||||
|
|
Loading…
Reference in New Issue