feat: kill clash by pid

This commit is contained in:
GyDi
2022-09-05 16:30:29 +08:00
committed by GitHub
parent ff2c1bf8ed
commit fcee41f00d
5 changed files with 109 additions and 2 deletions

View File

@@ -53,6 +53,9 @@ impl Core {
/// initialize the core state
pub fn init(&self, app_handle: tauri::AppHandle) {
// kill old clash process
Service::kill_old_clash();
let verge = self.verge.lock();
let clash_core = verge.clash_core.clone();