From b95edec754a96d3f8dfb024697a6e687353f7ef0 Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Sun, 1 Mar 2026 16:55:16 -0600 Subject: [PATCH] fix(shutdown): avoid forced exit(0) during main window close cx --- src-tauri/src/lib.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index f4a81940f..82009c188 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -1034,11 +1034,10 @@ pub fn run() { log::info!("DLNA connection will be cleaned up on drop"); - // Do not manually close secondary webview windows during teardown. - // Trigger a single process-level exit and let Tauri/WebKit own - // window destruction order to avoid WebKit EGL/TLS shutdown races. - api.prevent_close(); - window.app_handle().exit(0); + // Allow Tauri's normal close flow for the main window. + // Forcing app_handle.exit(0) from CloseRequested can race + // WebKit process teardown on Linux (EGL/TLS destructors). + // Letting the window close naturally reduces shutdown races. } } })