fixed an issue with error 0xc00000142

This commit is contained in:
coolcoala
2025-11-12 23:28:49 +03:00
parent aba9715453
commit 1aa0c7bc34
4 changed files with 97 additions and 2 deletions

View File

@@ -2,7 +2,7 @@
use crate::AppHandleManager;
use crate::{
config::Config,
core::{handle, sysopt, CoreManager},
core::{event_driven_proxy::EventDrivenProxyManager, handle, sysopt, CoreManager},
logging,
module::mihomo::MihomoManager,
utils::logging::Type,
@@ -69,6 +69,7 @@ pub fn quit() {
// 获取应用句柄并设置退出标志
let app_handle = handle::Handle::global().app_handle().unwrap();
handle::Handle::global().set_is_exiting();
EventDrivenProxyManager::global().notify_app_stopping();
// 优先关闭窗口,提供立即反馈
if let Some(window) = handle::Handle::global().get_window() {