From 176b5c6bd45be6e073435d941cf53f269eca69ce Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Mon, 14 Oct 2024 16:56:37 +0200 Subject: [PATCH] Re-add `block_in_place` in `stop` ... which somehow was removed as part of the recent refactoring. --- src/lib.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 4a7d081c5..67e49fd38 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -846,12 +846,14 @@ impl Node { // FIXME: For now, we wait up to 100 secs (BDK_WALLET_SYNC_TIMEOUT_SECS + 10) to allow // event handling to exit gracefully even if it was blocked on the BDK wallet syncing. We // should drop this considerably post upgrading to BDK 1.0. - let timeout_res = runtime.block_on(async { - tokio::time::timeout( - Duration::from_secs(100), - event_handling_stopped_receiver.changed(), - ) - .await + let timeout_res = tokio::task::block_in_place(move || { + runtime.block_on(async { + tokio::time::timeout( + Duration::from_secs(100), + event_handling_stopped_receiver.changed(), + ) + .await + }) }); match timeout_res {