From 44374891e3ef02a27eae84b6c72198a023ba6c26 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Tue, 25 Oct 2022 01:05:55 +0800 Subject: [PATCH] =?UTF-8?q?:recycle:=20=E6=A1=8C=E9=9D=A2=E7=AB=AF?= =?UTF-8?q?=E5=86=85=E6=A0=B8=E8=BF=9B=E7=A8=8B=E4=B8=8D=E5=86=8D=E4=BB=A5?= =?UTF-8?q?=E6=B8=B8=E7=A6=BB=E6=A8=A1=E5=BC=8F=E6=8B=89=E8=B5=B7=20https:?= =?UTF-8?q?//github.com/siyuan-note/siyuan/issues/6336?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/process.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kernel/model/process.go b/kernel/model/process.go index 65f43ac1d..1be4a41af 100644 --- a/kernel/model/process.go +++ b/kernel/model/process.go @@ -33,8 +33,11 @@ func HookResident() { for range time.Tick(time.Second * 30) { if 0 == util.CountSessions() { - logging.LogInfof("no active session, exit kernel process now") - Close(false, 1) + time.Sleep(time.Second * 7) + if 0 == util.CountSessions() { + logging.LogInfof("no active session, exit kernel process now") + Close(false, 1) + } } } }