better logging for removing stale requests

This commit is contained in:
Joe Ardent 2025-09-21 16:07:28 -07:00
parent e39d5d28b2
commit 16ef487581
2 changed files with 14 additions and 1 deletions

View file

@ -91,6 +91,12 @@ impl Debug for ReceiveRequest {
} }
} }
impl ReceiveRequest {
pub fn file_names(&self) -> Vec<String> {
self.files.values().map(|f| f.file_name.clone()).collect()
}
}
/// Contains the main network and backend state for an application session. /// Contains the main network and backend state for an application session.
#[derive(Clone)] #[derive(Clone)]
pub struct JocalService { pub struct JocalService {

View file

@ -88,7 +88,14 @@ async fn start_and_run(terminal: &mut DefaultTerminal, config: Config) -> Result
} }
} }
for id in stale_rx_requests { for id in stale_rx_requests {
app.receive_requests.remove(&id); if let Some(req) = app.receive_requests.get(&id) {
info!(
"Removing stale transfer request from {} for {}",
req.alias,
req.file_names().join(",")
);
app.receive_requests.remove(&id);
}
} }
} }
} }