Skip to content

Commit

Permalink
fix(daemon): panic in kubo/daemon.go:595 (#10473)
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Aug 12, 2024
1 parent 91ae982 commit a339e6e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/ipfs/kubo/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,7 @@ take effect.
cfg, err := cctx.GetConfig()
if err != nil {
log.Errorf("failed to access config: %s", err)
return
}
if len(cfg.Bootstrap) == 0 && len(cfg.Peering.Peers) == 0 {
// Skip peer check if Bootstrap and Peering lists are empty
Expand All @@ -607,10 +608,12 @@ take effect.
ipfs, err := coreapi.NewCoreAPI(node)
if err != nil {
log.Errorf("failed to access CoreAPI: %v", err)
return
}
peers, err := ipfs.Swarm().Peers(cctx.Context())
if err != nil {
log.Errorf("failed to read swarm peers: %v", err)
return
}
if len(peers) == 0 {
log.Error("failed to bootstrap (no peers found): consider updating Bootstrap or Peering section of your config")
Expand Down

0 comments on commit a339e6e

Please sign in to comment.