Skip to content

Commit a185c7e

Browse files
authored
Merge pull request #397 from maan2003/push-umnnqytpxztz
fix: compile with tokio_unstable
2 parents 60dffa8 + 2b006ad commit a185c7e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,8 @@ impl Node {
640640
/// After this returns most API methods will return [`Error::NotRunning`].
641641
pub fn stop(&self) -> Result<(), Error> {
642642
let runtime = self.runtime.write().unwrap().take().ok_or(Error::NotRunning)?;
643+
#[cfg(tokio_unstable)]
644+
let metrics_runtime = Arc::clone(&runtime);
643645

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

@@ -702,7 +704,7 @@ impl Node {
702704
log_trace!(
703705
self.logger,
704706
"Active runtime tasks left prior to shutdown: {}",
705-
runtime.metrics().active_tasks_count()
707+
metrics_runtime.metrics().active_tasks_count()
706708
);
707709
}
708710

0 commit comments

Comments
 (0)