From ad2c0909b4994299f36554a7aed0339cd3898f2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20Eng=C3=A9libert?= Date: Fri, 13 Mar 2026 10:18:12 +0100 Subject: [PATCH] Fix notify progress with TLS --- src/client.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client.rs b/src/client.rs index bf6f5eb..b0d6df7 100644 --- a/src/client.rs +++ b/src/client.rs @@ -201,6 +201,7 @@ pub async fn play( let limiter = limiter.clone(); let running = running.clone(); let dummy_bytes = dummy_bytes.clone(); + let notify_socket = notify_socket.clone(); handles.push(tokio::spawn(async move { let mut running_guard = running.lock().await; running_guard.insert(*conn_id); @@ -275,6 +276,9 @@ pub async fn play( println!("Client: {} / {}", cnt + 1, total); } drop(limiter); + if let Some(notify_socket) = ¬ify_socket { + notify_socket.send(&cnt.to_be_bytes()).unwrap(); + } let mut running_guard = running.lock().await; running_guard.remove(conn_id); drop(running_guard); @@ -361,10 +365,10 @@ pub async fn play( if debug { println!("Client: {} / {}", cnt, total); } + drop(limiter); if let Some(notify_socket) = ¬ify_socket { notify_socket.send(&cnt.to_be_bytes()).unwrap(); } - drop(limiter); let mut running_guard = running.lock().await; running_guard.remove(conn_id); drop(running_guard);