fix: fallback to saving pw in system if secret agent channel is closed (#1759)

This commit is contained in:
Ashley Wulber 2026-01-15 17:02:41 -05:00 committed by GitHub
parent d7f1cff725
commit 42129c6b8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -908,9 +908,10 @@ impl NetworkManagerState {
identity: Option<&str>,
password: Option<&str>,
hw_address: HwAddress,
secret_tx: Option<tokio::sync::mpsc::Sender<nm_secret_agent::Request>>,
mut secret_tx: Option<tokio::sync::mpsc::Sender<nm_secret_agent::Request>>,
network_type: NetworkType,
) -> Result<(), Error> {
secret_tx = secret_tx.filter(|tx| !tx.is_closed());
let nm = NetworkManager::new(conn).await?;
for c in nm.active_connections().await.unwrap_or_default() {