Skip to content

Commit 61fe290

Browse files
committed
Fix: Stop MCP server before shutdown
1 parent 190bfe9 commit 61fe290

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • apps/desktop/src-tauri/src

apps/desktop/src-tauri/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -870,6 +870,7 @@ pub fn run() {
870870
&& window.label() == "main"
871871
{
872872
ai::manager::shutdown();
873+
mcp::stop_mcp_server();
873874
#[cfg(any(target_os = "macos", target_os = "linux"))]
874875
network::mdns_discovery::stop_discovery();
875876
window.app_handle().exit(0);
@@ -879,6 +880,7 @@ pub fn run() {
879880
&& window.label() == "main"
880881
{
881882
ai::manager::shutdown();
883+
mcp::stop_mcp_server();
882884
#[cfg(any(target_os = "macos", target_os = "linux"))]
883885
network::mdns_discovery::stop_discovery();
884886
}
@@ -888,6 +890,7 @@ pub fn run() {
888890
.run(|_app, event| {
889891
if let tauri::RunEvent::Exit = event {
890892
ai::manager::shutdown();
893+
mcp::stop_mcp_server();
891894
#[cfg(any(target_os = "macos", target_os = "linux"))]
892895
network::mdns_discovery::stop_discovery();
893896
}

0 commit comments

Comments
 (0)