mirror of
https://github.com/daywalker90/cln-nip47.git
synced 2026-08-13 12:33:43 +02:00
actually stop task if no relay ever connected when using revoke
This commit is contained in:
parent
5533eb0b93
commit
19b335c609
2 changed files with 9 additions and 0 deletions
|
|
@ -1,5 +1,10 @@
|
|||
# Changelog
|
||||
|
||||
## [0.1.2] Unreleased
|
||||
|
||||
### Fixed
|
||||
- ``nip47-revoke``: actually stop task if no relays were ever connected
|
||||
|
||||
## [0.1.1] 2025-04-07
|
||||
|
||||
### Changed
|
||||
|
|
|
|||
|
|
@ -49,6 +49,10 @@ pub async fn run_nwc(
|
|||
.wait_for_connection(Duration::from_secs(30))
|
||||
.await;
|
||||
let relays = client_clone.relays().await;
|
||||
if relays.is_empty() {
|
||||
log::info!("No more relays left, we probably shut down. Exiting...");
|
||||
break;
|
||||
}
|
||||
let mut connected = false;
|
||||
for (url, relay) in relays {
|
||||
if relay.status() == RelayStatus::Connected {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue