From 4056ae02319aad843a8f4473b48d952987978aad Mon Sep 17 00:00:00 2001 From: Evan Chen Date: Sun, 19 Dec 2021 02:19:54 +0800 Subject: [PATCH] fix: lock --- system/system.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/system/system.go b/system/system.go index cdd58d4..5ea8ebc 100644 --- a/system/system.go +++ b/system/system.go @@ -134,8 +134,10 @@ func (sys *System) Start() { sys.quit <- syscall.SIGTERM } }() - <-sys.started - history.Send(history.Info().Nm("SysUP").Msg("system started")) + go func() { + <-sys.started + history.Send(history.Info().Nm("SysUP").Msg("system started")) + }() <-sys.quit isRestart := false if sys.status == sys_restart {