fix emulation client creation

This commit is contained in:
Ferdinand Schober
2024-07-12 18:27:49 +02:00
parent f74b7f98fe
commit a60a1c7095

View File

@@ -98,15 +98,16 @@ async fn do_emulation(
server.set_emulation_status(Status::Enabled);
let res = do_emulation_session(server, &mut emulation, rx, udp_rx, sender_tx, capture_tx).await;
emulation.terminate().await;
res?;
// add clients
for handle in server.active_clients() {
emulation.create(handle).await;
}
let res = do_emulation_session(server, &mut emulation, rx, udp_rx, sender_tx, capture_tx).await;
emulation.terminate().await;
res?;
// release potentially still pressed keys
release_all_keys(server, &mut emulation).await?;