Skip to content

Commit

Permalink
fix: compile with tokio_unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
maan2003 committed Nov 4, 2024
1 parent 2156611 commit b6fd4f4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,8 @@ 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.
#[cfg(tokio_unstable)]
let runtime_clone = runtime.clone();
let timeout_res = tokio::task::block_in_place(move || {
runtime.block_on(async {
tokio::time::timeout(
Expand Down Expand Up @@ -702,7 +704,7 @@ impl Node {
log_trace!(
self.logger,
"Active runtime tasks left prior to shutdown: {}",
runtime.metrics().active_tasks_count()
runtime_clone.metrics().num_alive_tasks()
);
}

Expand Down

0 comments on commit b6fd4f4

Please sign in to comment.