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:
@@ -24,7 +24,7 @@ pub fn run() {
|
|||||||
.expect("failed to resolve app data dir")
|
.expect("failed to resolve app data dir")
|
||||||
.join("connections.json");
|
.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 {
|
if let Err(e) = mcp::start_mcp_server(state, connections_path, 9427).await {
|
||||||
log::error!("MCP server error: {}", e);
|
log::error!("MCP server error: {}", e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user