Skip to content

Commit

Permalink
fix initial activation
Browse files Browse the repository at this point in the history
  • Loading branch information
feschber committed Jan 16, 2024
1 parent 118c0df commit 535cd05
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 535cd05

Please sign in to comment.