fix: move channel creation after token initialization in run_with_tui

This commit is contained in:
monosans
2025-07-16 14:46:31 +03:00
parent 1d3d33fc8a
commit aa634070cb
+2 -1
View File
@@ -309,10 +309,11 @@ async fn run_with_tui(
ratatui::try_init().wrap_err("failed to initialize ratatui")?;
let terminal_guard = tui::RatatuiRestoreGuard;
let (tx, rx) = tokio::sync::mpsc::unbounded_channel();
let token = tokio_util::sync::CancellationToken::new();
tokio::spawn(watch_signals(token.clone()));
let (tx, rx) = tokio::sync::mpsc::unbounded_channel();
tokio::try_join!(
main_task(config, token.clone(), tx.clone()),
async move {