🎨 桌面端退出拉起更新安装时有时需要重启两次 Fix https://github.com/siyuan-note/siyuan/issues/6544

This commit is contained in:
Liang Ding 2022-11-11 10:09:36 +08:00
parent a2cc5ca0aa
commit 4b9fa8b339
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
8 changed files with 20 additions and 14 deletions

View file

@ -429,12 +429,10 @@ func Close(force bool, execInstallPkg int) (exitCode int) {
go func() {
time.Sleep(500 * time.Millisecond)
if waitSecondForExecInstallPkg {
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)
}
util.PushMsg(Conf.Language(130), 1000*5)
// 桌面端退出拉起更新安装时有时需要重启两次 https://github.com/siyuan-note/siyuan/issues/6544
// 这里多等待一段时间,等待安装程序启动
time.Sleep(4 * time.Second)
}
logging.LogInfof("exited kernel")
util.WebSocketServer.Close()