Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ impl App {
// Setup Ctrl+C handler with CancellationToken
let cancel = self.cancel_token.clone();
tokio::spawn(async move {
signal::ctrl_c().await.ok();
if let Err(e) = signal::ctrl_c().await {
warn!(error = %e, "failed to install Ctrl+C handler");
return;
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On Ctrl+C handler setup failure, the spawned task returns without cancelling. This changes behavior vs the previous .ok() (which would still call cancel.cancel() after an immediate Err), and can leave the app running without any CancellationToken-based shutdown path (streaming tasks may keep going, and Ctrl+C may no longer trigger graceful cancellation). Consider cancelling after logging (to preserve the prior fail-fast behavior) or surfacing this as a fatal startup error instead of silently continuing.

Suggested change
return;

Copilot uses AI. Check for mistakes.
}
cancel.cancel();
});

Expand Down
Loading