From 50057e049d69200e735000cf58438273a01433eb Mon Sep 17 00:00:00 2001 From: Andrew Meckley Date: Fri, 27 Feb 2026 20:56:14 -0600 Subject: [PATCH] fix: use tauri::async_runtime::spawn in window close handler The window close handler in on_window_event used tokio::spawn directly, which panics because there is no Tokio reactor running in that context. Replaced with tauri::async_runtime::spawn which correctly routes through Tauri's managed async runtime. Fixes: "there is no reactor running, must be called from the context of a Tokio 1.x runtime" panic on app launch. Co-Authored-By: Claude Opus 4.6 --- tauri/src-tauri/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tauri/src-tauri/src/main.rs b/tauri/src-tauri/src/main.rs index 255655aa..a706f256 100644 --- a/tauri/src-tauri/src/main.rs +++ b/tauri/src-tauri/src/main.rs @@ -675,7 +675,7 @@ pub fn run() { }); // Wait for frontend response or timeout - tokio::spawn(async move { + tauri::async_runtime::spawn(async move { tokio::select! { _ = rx.recv() => { // Frontend responded, close window