Commit fbba7c8f authored by Juan Batiz-Benet's avatar Juan Batiz-Benet

bootstrap: only dht bootstrap with live conns

parent b9fe3780
......@@ -96,10 +96,12 @@ func bootstrap(ctx context.Context,
}
// we can try running dht bootstrap even if we're connected to all bootstrap peers.
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
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
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment