From aa634070cb8dc18469b05b3ce3adadd89991e467 Mon Sep 17 00:00:00 2001 From: monosans Date: Wed, 16 Jul 2025 14:46:31 +0300 Subject: [PATCH] fix: move channel creation after token initialization in run_with_tui --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index afac70c..a3edbf9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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 {