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);