fix: single instance doesn't shutdown immediately (#1019)

* Fix single instance doesn't shutdown immediately

* Add change file
pull/1021/head
Tony 1 year ago committed by GitHub
parent 99bea2559c
commit 2397ec5937
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,5 @@
---
'single-instance': patch
---
Fix doesn't shutdown immediately.

@ -70,7 +70,8 @@ pub fn init<R: Runtime>(f: Box<SingleInstanceCallback<R>>) -> TauriPlugin<R> {
),
);
}
std::process::exit(0)
app.cleanup_before_exit();
std::process::exit(0);
}
_ => {}
}

@ -62,7 +62,8 @@ pub fn init<R: Runtime>(f: Box<SingleInstanceCallback<R>>) -> TauriPlugin<R> {
lpData: bytes.as_ptr() as _,
};
SendMessageW(hwnd, WM_COPYDATA, 0, &cds as *const _ as _);
app.exit(0);
app.cleanup_before_exit();
std::process::exit(0);
}
}
} else {

Loading…
Cancel
Save