bootstrap work

This commit is contained in:
John Smith 2022-06-29 15:24:04 -04:00
parent 11740dc1eb
commit 97b5fad9f1

View File

@ -250,13 +250,15 @@ impl RoutingTable {
log_rtab!(debug "--- bootstrap_task"); log_rtab!(debug "--- bootstrap_task");
// See if we are specifying a direct dialinfo for bootstrap, if so use the direct mechanism // See if we are specifying a direct dialinfo for bootstrap, if so use the direct mechanism
if !bootstrap_nodes.is_empty() { if !bootstrap.is_empty() && bootstrap_nodes.is_empty() {
let mut bootstrap_dialinfos = Vec::<DialInfo>::new(); let mut bootstrap_dialinfos = Vec::<DialInfo>::new();
for b in &bootstrap { for b in &bootstrap {
if let Ok(bootstrap_di) = DialInfo::from_str(&b) { if let Ok(bootstrap_di_vec) = DialInfo::try_vec_from_url(&b) {
for bootstrap_di in bootstrap_di_vec {
bootstrap_dialinfos.push(bootstrap_di); bootstrap_dialinfos.push(bootstrap_di);
} }
} }
}
if bootstrap_dialinfos.len() > 0 { if bootstrap_dialinfos.len() > 0 {
return self return self
.direct_bootstrap_task_routine(stop_token, bootstrap_dialinfos) .direct_bootstrap_task_routine(stop_token, bootstrap_dialinfos)