From e02225a3b97252bee95bcaec41e164d818eac0f4 Mon Sep 17 00:00:00 2001 From: "A.Shakhmatov" Date: Thu, 12 Feb 2026 14:03:26 +0300 Subject: [PATCH] fix: use tauri::async_runtime::spawn for MCP server tokio::spawn panics in .setup() because Tauri's Tokio reactor isn't active yet at that point. tauri::async_runtime::spawn handles this. Co-Authored-By: Claude Opus 4.6 --- src-tauri/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 8167f5b..0d533f4 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -24,7 +24,7 @@ pub fn run() { .expect("failed to resolve app data dir") .join("connections.json"); - tokio::spawn(async move { + tauri::async_runtime::spawn(async move { if let Err(e) = mcp::start_mcp_server(state, connections_path, 9427).await { log::error!("MCP server error: {}", e); }