mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-09-19 04:08:45 +03:00
fix: allow graceful shutdown of sidecar commands on exit (#4561)
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
This commit is contained in:
parent
e046e04c63
commit
34879f7344
5
.changes/fix-sidecar-shutdown.md
Normal file
5
.changes/fix-sidecar-shutdown.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
Emits RunEvent::Exit prior to killing child processes managed by Tauri, allowing graceful shutdown of sidecar binaries.
|
@ -731,13 +731,13 @@ impl<R: Runtime> App<R> {
|
||||
let manager = self.manager.clone();
|
||||
self.runtime.take().unwrap().run(move |event| match event {
|
||||
RuntimeRunEvent::Exit => {
|
||||
app_handle.cleanup_before_exit();
|
||||
on_event_loop_event(
|
||||
&app_handle,
|
||||
RuntimeRunEvent::Exit,
|
||||
&manager,
|
||||
Some(&mut callback),
|
||||
);
|
||||
app_handle.cleanup_before_exit();
|
||||
}
|
||||
_ => {
|
||||
on_event_loop_event(&app_handle, event, &manager, Some(&mut callback));
|
||||
|
Loading…
Reference in New Issue
Block a user