mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-31 13:58:49 +01:00
🎨 Windows 端退出拉起更新安装时有时需要重启两次 Fix https://github.com/siyuan-note/siyuan/issues/6467
This commit is contained in:
parent
85262863ee
commit
f3bcdb1d39
1 changed files with 9 additions and 5 deletions
|
|
@ -385,10 +385,9 @@ var exitLock = sync.Mutex{}
|
|||
//
|
||||
// force:是否不执行同步过程而直接退出
|
||||
// execInstallPkg:是否执行新版本安装包
|
||||
//
|
||||
// 0:默认按照设置项 System.DownloadInstallPkg 检查并推送提示
|
||||
// 1:不执行新版本安装
|
||||
// 2:执行新版本安装
|
||||
// 0:默认按照设置项 System.DownloadInstallPkg 检查并推送提示
|
||||
// 1:不执行新版本安装
|
||||
// 2:执行新版本安装
|
||||
func Close(force bool, execInstallPkg int) (exitCode int) {
|
||||
exitLock.Lock()
|
||||
defer exitLock.Unlock()
|
||||
|
|
@ -434,7 +433,12 @@ func Close(force bool, execInstallPkg int) (exitCode int) {
|
|||
go func() {
|
||||
time.Sleep(500 * time.Millisecond)
|
||||
if waitSecondForExecInstallPkg {
|
||||
time.Sleep(1 * time.Second)
|
||||
time.Sleep(2 * time.Second)
|
||||
if gulu.OS.IsWindows() {
|
||||
// Windows 端退出拉起更新安装时有时需要重启两次 https://github.com/siyuan-note/siyuan/issues/6467
|
||||
// 这里多等待一段时间,等待安装程序启动后时会在 NSIS 自定义脚本中 Kill SiYuan 进程,详见 install.nsh
|
||||
time.Sleep(5 * time.Second)
|
||||
}
|
||||
}
|
||||
logging.LogInfof("exited kernel")
|
||||
util.WebSocketServer.Close()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue