fix: crash

master
Evan Chen 2021-12-19 02:23:51 +08:00
parent 4056ae0231
commit 6b53ae502d
1 changed files with 4 additions and 2 deletions

View File

@ -143,8 +143,10 @@ func (sys *System) Start() {
if sys.status == sys_restart { if sys.status == sys_restart {
isRestart = true isRestart = true
} }
// only log if system has started
if sys.status == sys_wait {
history.Send(history.Info().Nm("SysDown").Msg("system stoped")) history.Send(history.Info().Nm("SysDown").Msg("system stoped"))
}
l.Info().Msg("Terminating...") l.Info().Msg("Terminating...")
sys.status = sys_term sys.status = sys_term
go func() { go func() {