fix: restart app failed (#4974)

* fix: failed to restart app

* chore: cleanup

* chore: cargo fmt

* chore: use AsyncHandler

* chore: clippy

* chore: update
This commit is contained in:
oomeow
2025-10-09 20:08:25 +08:00
committed by GitHub
parent 14b990ad9f
commit 1357913f8b
3 changed files with 32 additions and 41 deletions

View File

@@ -1,3 +1,4 @@
use crate::utils;
use crate::utils::window_manager::WindowManager;
use crate::{
config::Config,
@@ -21,6 +22,7 @@ async fn open_or_close_dashboard_internal() {
pub async fn quit() {
logging!(debug, Type::System, true, "启动退出流程");
utils::server::shutdown_embedded_server();
// 获取应用句柄并设置退出标志
let app_handle = handle::Handle::app_handle();