RircdState::run()
This commit is contained in:
parent
21f4282cca
commit
e6e4a3df79
|
@ -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(())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue