From 2b006addf17f66dbe4c380b2f74486bdfcad92f0 Mon Sep 17 00:00:00 2001 From: maan2003 Date: Mon, 4 Nov 2024 20:14:08 +0530 Subject: [PATCH] fix: compile with tokio_unstable --- src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 8fc3972e1..cce4352c7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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()); @@ -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() ); }