Better wait for kill signal

This commit is contained in:
Gregory Schier
2024-07-27 09:13:34 -07:00
parent f925a0cc54
commit def9a3cfd2
2 changed files with 7 additions and 19 deletions

View File

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