mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 10:27:46 +08:00
fix(provide): do not output keystore error on shutdown (#11130)
* Do not output keystore error on shutdown. Closes #11127 * fix: add debug log for keystore sync interrupted by shutdown log at DEBUG level when keystore sync is interrupted during shutdown, preserving error details for debugging while keeping normal output clean --------- Co-authored-by: Marcin Rataj <lidel@lidel.org>
This commit is contained in:
parent
25ebab9dae
commit
ac9ae9bf5d
@ -489,10 +489,14 @@ func SweepingProviderOpt(cfg *config.Config) fx.Option {
|
||||
strategy := cfg.Provide.Strategy.WithDefault(config.DefaultProvideStrategy)
|
||||
logger.Infow("provider keystore sync started", "strategy", strategy)
|
||||
if err := syncKeystore(ctx); err != nil {
|
||||
if ctx.Err() == nil {
|
||||
logger.Errorw("provider keystore sync failed", "err", err, "strategy", strategy)
|
||||
} else {
|
||||
logger.Infow("provider keystore sync completed", "strategy", strategy)
|
||||
logger.Debugw("provider keystore sync interrupted by shutdown", "err", err, "strategy", strategy)
|
||||
}
|
||||
return
|
||||
}
|
||||
logger.Infow("provider keystore sync completed", "strategy", strategy)
|
||||
}()
|
||||
|
||||
gcCtx, c := context.WithCancel(context.Background())
|
||||
|
||||
Loading…
Reference in New Issue
Block a user