diff --git a/apps/desktop/src-tauri/src/backend.rs b/apps/desktop/src-tauri/src/backend.rs index f5a7e81d75..0e629f4857 100644 --- a/apps/desktop/src-tauri/src/backend.rs +++ b/apps/desktop/src-tauri/src/backend.rs @@ -3,7 +3,6 @@ use std::sync::Arc; use bleep::{analytics, Application, Configuration, Environment}; use once_cell::sync::OnceCell; use sentry::ClientInitGuard; -use tauri::{plugin::Plugin, Invoke}; use tracing::{error, warn}; use super::{Manager, Payload, Runtime}; diff --git a/apps/desktop/src-tauri/src/qdrant.rs b/apps/desktop/src-tauri/src/qdrant.rs index 1801e8cc97..32bb136d0d 100644 --- a/apps/desktop/src-tauri/src/qdrant.rs +++ b/apps/desktop/src-tauri/src/qdrant.rs @@ -5,6 +5,7 @@ use std::{ }; use tauri::{plugin::Plugin, Runtime}; +use tracing::warn; use super::relative_command_path; @@ -49,11 +50,14 @@ where fn on_event(&mut self, _app: &tauri::AppHandle, event: &tauri::RunEvent) { use tauri::RunEvent::{Exit, ExitRequested}; if matches!(event, Exit | ExitRequested { .. }) { - self.child - .take() - .expect("qdrant not started") - .kill() - .expect("failed to kill qdrant") + let Some(mut child) = self.child.take() else { + warn!("qdrant has been killed"); + return; + }; + + if let Err(err) = child.kill() { + warn!(?err, "failed to kill qdrant"); + }; } } }