@cryptotaxi247 / kubo / commits / ac9ae9bf5

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>

Andrew Gillis committed Jan 9, 2026 at 11:45 UTC ac9ae9bf5daec2cef4589a24807a376a7e83d4be
1 file changed +7 -3
core/node/provider.go
+7 -3
@@ -489,10 +489,14 @@ func SweepingProviderOpt(cfg *config.Config) fx.Option {
489 strategy := cfg.Provide.Strategy.WithDefault(config.DefaultProvideStrategy)
490 logger.Infow("provider keystore sync started", "strategy", strategy)
491 if err := syncKeystore(ctx); err != nil {
492 - logger.Errorw("provider keystore sync failed", "err", err, "strategy", strategy)
493 - } else {
494 - logger.Infow("provider keystore sync completed", "strategy", strategy)
492 + if ctx.Err() == nil {
493 + logger.Errorw("provider keystore sync failed", "err", err, "strategy", strategy)
494 + } else {
495 + logger.Debugw("provider keystore sync interrupted by shutdown", "err", err, "strategy", strategy)
496 + }
497 + return
498 }
499 + logger.Infow("provider keystore sync completed", "strategy", strategy)
500 }()
501
502 gcCtx, c := context.WithCancel(context.Background())