chore: 添加无更新可用时的延迟退出功能

This commit is contained in:
2025-07-22 23:03:23 +08:00
parent 6b646378b6
commit 2aad0c65c2

View File

@@ -12,6 +12,7 @@ import (
"strings"
"sync"
"syscall"
"time"
"AUTO_MAA_Go_Updater/api"
"AUTO_MAA_Go_Updater/config"
@@ -576,6 +577,11 @@ func (app *Application) executeCheckingState() (UpdateState, error) {
if !isUpdateAvailable {
app.logger.Info("无可用更新")
fmt.Println("当前已是最新版本")
// 延迟 5 秒再退出
fmt.Println("5 秒后自动退出...")
time.Sleep(5 * time.Second)
return StateCompleted, nil
}