mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 00:35:38 +08:00
fix: ensure app exits gracefully when an instance is already running
This commit is contained in:
@@ -98,7 +98,7 @@ pub fn run() {
|
|||||||
if result.is_err() {
|
if result.is_err() {
|
||||||
logging!(info, Type::Setup, true, "检测到已有应用实例运行");
|
logging!(info, Type::Setup, true, "检测到已有应用实例运行");
|
||||||
if let Some(app_handle) = AppHandleManager::global().get() {
|
if let Some(app_handle) = AppHandleManager::global().get() {
|
||||||
let _ = app_handle.exit(0);
|
app_handle.exit(0);
|
||||||
} else {
|
} else {
|
||||||
std::process::exit(0);
|
std::process::exit(0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user