mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-21 12:10:55 +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! {
|
||||
_ = signal::ctrl_c() => {
|
||||
log::info!("terminating service");
|
||||
|
||||
Reference in New Issue
Block a user