RircdState::run()

This commit is contained in:
some body 2021-09-16 14:38:52 -05:00
parent 21f4282cca
commit e6e4a3df79
1 changed files with 3 additions and 2 deletions

View File

@ -34,7 +34,8 @@ impl RircdState {
}
pub async fn run(mut self) -> Result<()> {
for endpoint in self.endpoints {
//try to start each endpoint
self.endpoints.iter().filter(|ep| ep.is_active()).for_each(|endpoint| {
let endpoint_name = endpoint.name();
let (success_status_send,success_status_recv) = oneshot::channel::<Result<()>>();
tokio::spawn(endpoint.listen(success_status_send));
@ -44,7 +45,7 @@ impl RircdState {
Ok(_) => format!("SUCCEEDED |"),
Err(e) => format!("FAILED| <{}>", e),
});
}
});
Ok(())
}
}