🎨 桌面端自动下载更新安装包 https://github.com/siyuan-note/siyuan/issues/5837

This commit is contained in:
Liang Ding 2022-09-09 17:45:10 +08:00
parent 8811f329f9
commit a7ba14324c
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
2 changed files with 5 additions and 5 deletions

View file

@ -353,9 +353,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()

View file

@ -34,7 +34,7 @@ func HookResident() {
for range time.Tick(time.Second * 30) {
if 0 == util.CountSessions() {
logging.LogInfof("no active session, exit kernel process now")
Close(false, 2)
Close(false, 1)
}
}
}
@ -44,5 +44,5 @@ func HandleSignal() {
signal.Notify(c, syscall.SIGINT, syscall.SIGQUIT, syscall.SIGTERM)
s := <-c
logging.LogInfof("received os signal [%s], exit kernel process now", s)
Close(false, 2)
Close(false, 1)
}