mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-29 01:12:24 +08:00
bootstrap: only dht bootstrap with live conns
This commit is contained in:
@ -96,11 +96,13 @@ func bootstrap(ctx context.Context,
|
||||
}
|
||||
|
||||
// we can try running dht bootstrap even if we're connected to all bootstrap peers.
|
||||
if len(h.Network().Conns()) > 0 {
|
||||
if err := r.Bootstrap(ctx, numDHTBootstrapQueries); err != nil {
|
||||
// log this as Info. later on, discern better between errors.
|
||||
log.Infof("dht bootstrap err: %s", err)
|
||||
return nil
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user