diff --git a/mediarepo-api/src/tauri_plugin/commands/repo.rs b/mediarepo-api/src/tauri_plugin/commands/repo.rs index a8a3373..beca33a 100644 --- a/mediarepo-api/src/tauri_plugin/commands/repo.rs +++ b/mediarepo-api/src/tauri_plugin/commands/repo.rs @@ -144,6 +144,8 @@ pub async fn close_local_repository( if let Err(e) = api.shutdown_daemon().await { tracing::error!("failed to ask the daemon to shut down daemon {:?}", e); } + // allow the repository to gracefully stop within 1 second + tokio::time::sleep(Duration::from_secs(1)).await; } app_state.stop_running_daemon(&path).await?; }