Skip to content

Commit

Permalink
Re-add block_in_place in stop
Browse files Browse the repository at this point in the history
... which somehow was removed as part of the recent refactoring.
  • Loading branch information
tnull committed Oct 14, 2024
1 parent 3f1c842 commit 176b5c6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 176b5c6

Please sign in to comment.