Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions app/view/main/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -1220,10 +1220,11 @@ def restart_app(self):
执行安全验证后重启程序,清理所有资源"""
logger.info("正在发起重启请求...")

if self.pre_class_reset_timer.isActive():
self.pre_class_reset_timer.stop()

self.cleanup_shortcuts()
self._stop_pre_class_reset_timer()
self._cleanup_shortcuts()
self._stop_ipc_client()
self._close_all_windows()
self._close_main_window()

# 使用 EXIT_CODE_RESTART 退出码来触发重启
# main.py 中的 handle_exit() 函数会检测此退出码并执行重启逻辑
Expand Down
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,10 @@ def initialize_application():

wm.app_start_time = time.perf_counter()

shared_memory, is_first_instance = check_single_instance()

time.sleep(PROCESS_EXIT_WAIT_SECONDS)

shared_memory, is_first_instance = check_single_instance()

return program_dir, shared_memory, is_first_instance


Expand Down
Loading