diff --git a/libs/sdk-core/src/breez_services.rs b/libs/sdk-core/src/breez_services.rs index 167591ba2..d527f735a 100644 --- a/libs/sdk-core/src/breez_services.rs +++ b/libs/sdk-core/src/breez_services.rs @@ -1651,6 +1651,7 @@ impl BreezServices { let cloned = self.clone(); tokio::spawn(async move { let mut shutdown_receiver = cloned.shutdown_receiver.clone(); + let mut reconnect_receiver = cloned.hibernation_receiver.clone(); loop { if shutdown_receiver.has_changed().unwrap_or(true) { return; @@ -1704,6 +1705,11 @@ impl BreezServices { debug!("Invoice tracking task has completed"); return; } + + _ = reconnect_receiver.changed() => { + debug!("Reconnect hibernation: track invoices"); + break; + } } } } @@ -1716,6 +1722,7 @@ impl BreezServices { let cloned = self.clone(); tokio::spawn(async move { let mut shutdown_receiver = cloned.shutdown_receiver.clone(); + let mut reconnect_receiver = cloned.hibernation_receiver.clone(); loop { if shutdown_receiver.has_changed().unwrap_or(true) { return; @@ -1744,6 +1751,11 @@ impl BreezServices { debug!("Track logs task has completed"); return; } + + _ = reconnect_receiver.changed() => { + debug!("Reconnect hibernation: track logs"); + break; + } } } }