Skip to content

Commit 176b5c6

Browse files
committed
Re-add block_in_place in stop
... which somehow was removed as part of the recent refactoring.
1 parent 3f1c842 commit 176b5c6

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/lib.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -846,12 +846,14 @@ impl Node {
846846
// FIXME: For now, we wait up to 100 secs (BDK_WALLET_SYNC_TIMEOUT_SECS + 10) to allow
847847
// event handling to exit gracefully even if it was blocked on the BDK wallet syncing. We
848848
// should drop this considerably post upgrading to BDK 1.0.
849-
let timeout_res = runtime.block_on(async {
850-
tokio::time::timeout(
851-
Duration::from_secs(100),
852-
event_handling_stopped_receiver.changed(),
853-
)
854-
.await
849+
let timeout_res = tokio::task::block_in_place(move || {
850+
runtime.block_on(async {
851+
tokio::time::timeout(
852+
Duration::from_secs(100),
853+
event_handling_stopped_receiver.changed(),
854+
)
855+
.await
856+
})
855857
});
856858

857859
match timeout_res {

0 commit comments

Comments
 (0)