mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-04-27 11:56:05 +02:00
fix: single instance doesn't shutdown immediately (#1019)
* Fix single instance doesn't shutdown immediately * Add change file
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user