Fix killing command on Windows

This commit is contained in:
Gregory Schier
2024-07-28 15:40:19 -07:00
parent 410cb7969c
commit f91dd24a9b
3 changed files with 14 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
use log::{debug, info};
use std::time::Duration;
use tauri::{AppHandle, Manager, Runtime};
use tokio::sync::watch::Sender;
use tonic::transport::Channel;
@@ -32,6 +33,9 @@ impl PluginManager {
pub async fn cleanup(&mut self) {
self.kill_tx.send_replace(true);
// Give it a bit of time to kill
tokio::time::sleep(Duration::from_millis(500)).await;
}
pub async fn run_import(&mut self, data: &str) -> Result<HookResponse, String> {