From 535cd055b90c85d698de69c6d997548b48352078 Mon Sep 17 00:00:00 2001 From: Ferdinand Schober Date: Tue, 16 Jan 2024 19:49:34 +0100 Subject: [PATCH] fix initial activation --- src/server.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/server.rs b/src/server.rs index 01c0889e..10ba9a5e 100644 --- a/src/server.rs +++ b/src/server.rs @@ -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::>(); + for client in active { + frontend_tx + .send(FrontendEvent::ActivateClient(client, true)) + .await?; + } + tokio::select! { _ = signal::ctrl_c() => { log::info!("terminating service");