From 943d00bf20e89ba15ef4dd8e400b974d6effdfab Mon Sep 17 00:00:00 2001 From: thesimplekid Date: Sun, 6 Oct 2024 20:57:33 +0200 Subject: [PATCH] feat: only start waiting if inactive --- crates/cdk/src/mint/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/cdk/src/mint/mod.rs b/crates/cdk/src/mint/mod.rs index 55d7c324..0699cf7f 100644 --- a/crates/cdk/src/mint/mod.rs +++ b/crates/cdk/src/mint/mod.rs @@ -196,6 +196,7 @@ impl Mint { let shutdown = Arc::clone(&shutdown); let key = *key; join_set.spawn(async move { + if !ln.is_wait_invoice_active() { loop { tokio::select! { _ = shutdown.notified() => { @@ -218,6 +219,7 @@ impl Mint { } } } + } } } });