Stop trying to resolve empty initial peer lists
Instead, log an error and return immediately.
This commit is contained in:
parent
b600e82d6e
commit
679920f6b8
|
@ -67,6 +67,11 @@ impl Config {
|
||||||
async fn resolve_peers(peers: &HashSet<String>) -> HashSet<SocketAddr> {
|
async fn resolve_peers(peers: &HashSet<String>) -> HashSet<SocketAddr> {
|
||||||
use futures::stream::StreamExt;
|
use futures::stream::StreamExt;
|
||||||
|
|
||||||
|
if peers.is_empty() {
|
||||||
|
error!("no initial peers in the network config. Hint: you must configure at least one peer or DNS seeder to run Zebra");
|
||||||
|
return HashSet::new();
|
||||||
|
}
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
// We retry each peer individually, as well as retrying if there are
|
// We retry each peer individually, as well as retrying if there are
|
||||||
// no peers in the combined list. DNS failures are correlated, so all
|
// no peers in the combined list. DNS failures are correlated, so all
|
||||||
|
|
Loading…
Reference in New Issue