From 1304e9860e76c9954c055c2d6fff7fe789c0c1d5 Mon Sep 17 00:00:00 2001 From: Borja Castellano Date: Wed, 4 Feb 2026 13:38:17 -0600 Subject: [PATCH] avoid progress event dispatch on cooldown and wait for updates --- dash-spv-ffi/src/client.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dash-spv-ffi/src/client.rs b/dash-spv-ffi/src/client.rs index 4ea599898..3e446ae38 100644 --- a/dash-spv-ffi/src/client.rs +++ b/dash-spv-ffi/src/client.rs @@ -83,7 +83,7 @@ where // Send initial progress { - let progress = receiver.borrow().clone(); + let progress = receiver.borrow_and_update().clone(); let guard = callbacks.lock().unwrap(); if let Some(ref cb) = *guard { dispatch_fn(cb, &progress); @@ -95,7 +95,7 @@ where result = receiver.changed() => { match result { Ok(()) => { - let progress = receiver.borrow().clone(); + let progress = receiver.borrow_and_update().clone(); let guard = callbacks.lock().unwrap(); if let Some(ref cb) = *guard { dispatch_fn(cb, &progress);