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 <noreply@anthropic.com>
This commit is contained in:
2026-02-12 14:03:26 +03:00
parent 4b6c547bcf
commit e02225a3b9

View File

@@ -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);
}