Skip to content

Commit

Permalink
Merge pull request #397 from maan2003/push-umnnqytpxztz
Browse files Browse the repository at this point in the history
fix: compile with tokio_unstable
  • Loading branch information
tnull authored Nov 11, 2024
2 parents 60dffa8 + 2b006ad commit a185c7e
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 a185c7e

Please sign in to comment.