From a7ba14324ce9d97fc1200c1e6a1e6285ebcee27a Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Fri, 9 Sep 2022 17:45:10 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E6=A1=8C=E9=9D=A2=E7=AB=AF=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E4=B8=8B=E8=BD=BD=E6=9B=B4=E6=96=B0=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E5=8C=85=20https://github.com/siyuan-note/siyuan/issues/5837?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/conf.go | 6 +++--- kernel/model/process.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/model/conf.go b/kernel/model/conf.go index 49a61600a..df8301881 100644 --- a/kernel/model/conf.go +++ b/kernel/model/conf.go @@ -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() diff --git a/kernel/model/process.go b/kernel/model/process.go index 4ea4a7387..65f43ac1d 100644 --- a/kernel/model/process.go +++ b/kernel/model/process.go @@ -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) }