fix initial activation

This commit is contained in:
Ferdinand Schober
2024-01-16 19:49:34 +01:00
parent 118c0dfc73
commit 535cd055b9

View File

@@ -417,6 +417,24 @@ impl Server {
}
});
let active = self
.client_manager
.borrow()
.get_client_states()
.filter_map(|s| {
if s.active {
Some(s.client.handle)
} else {
None
}
})
.collect::<Vec<_>>();
for client in active {
frontend_tx
.send(FrontendEvent::ActivateClient(client, true))
.await?;
}
tokio::select! {
_ = signal::ctrl_c() => {
log::info!("terminating service");