Skip to content

Commit 34879f7

Browse files
betamoslucasfernog
andauthored
fix: allow graceful shutdown of sidecar commands on exit (#4561)
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
1 parent e046e04 commit 34879f7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changes/fix-sidecar-shutdown.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": patch
3+
---
4+
5+
Emits RunEvent::Exit prior to killing child processes managed by Tauri, allowing graceful shutdown of sidecar binaries.

core/tauri/src/app.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,13 +731,13 @@ impl<R: Runtime> App<R> {
731731
let manager = self.manager.clone();
732732
self.runtime.take().unwrap().run(move |event| match event {
733733
RuntimeRunEvent::Exit => {
734-
app_handle.cleanup_before_exit();
735734
on_event_loop_event(
736735
&app_handle,
737736
RuntimeRunEvent::Exit,
738737
&manager,
739738
Some(&mut callback),
740739
);
740+
app_handle.cleanup_before_exit();
741741
}
742742
_ => {
743743
on_event_loop_event(&app_handle, event, &manager, Some(&mut callback));

0 commit comments

Comments
 (0)