mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-04-17 19:11:28 +03:00
fix initial activation
This commit is contained in:
@@ -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! {
|
tokio::select! {
|
||||||
_ = signal::ctrl_c() => {
|
_ = signal::ctrl_c() => {
|
||||||
log::info!("terminating service");
|
log::info!("terminating service");
|
||||||
|
|||||||
Reference in New Issue
Block a user