diff --git a/crates/wzp-client/src/cli.rs b/crates/wzp-client/src/cli.rs index d26c30a..f838d0b 100644 --- a/crates/wzp-client/src/cli.rs +++ b/crates/wzp-client/src/cli.rs @@ -509,12 +509,13 @@ async fn run_file_mode( let all_pcm = if record_file.is_some() { // Wait a bit for remaining packets after sender finishes tokio::time::sleep(tokio::time::Duration::from_secs(2)).await; - // The recv task will be aborted when we drop it, but first - // let's signal it by closing transport transport.close().await?; recv_handle.await.unwrap_or_default() } else { - recv_handle.await.unwrap_or_default() + // No recording — just close and exit + transport.close().await?; + recv_handle.abort(); + Vec::new() }; // Write recorded audio to file