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 8, 2024
1 parent 2156611 commit 2b006ad
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 @@ -640,6 +640,8 @@ impl Node {
/// After this returns most API methods will return [`Error::NotRunning`].
pub fn stop(&self) -> Result<(), Error> {
let runtime = self.runtime.write().unwrap().take().ok_or(Error::NotRunning)?;
#[cfg(tokio_unstable)]
let metrics_runtime = Arc::clone(&runtime);

log_info!(self.logger, "Shutting down LDK Node with node ID {}...", self.node_id());

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()
metrics_runtime.metrics().active_tasks_count()
);
}

Expand Down

0 comments on commit 2b006ad

Please sign in to comment.