Skip to content

Commit

Permalink
Merge pull request #373 from tnull/2024-10-stop-block-in-place
Browse files Browse the repository at this point in the history
Re-add `block_in_place` in `stop`
  • Loading branch information
tnull authored Oct 14, 2024
2 parents 3f1c842 + 176b5c6 commit 6372475
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 6372475

Please sign in to comment.