处理服务停止时的错误提示

This commit is contained in:
liwei1dao 2022-07-07 11:41:28 +08:00
parent 93278a51c0
commit b1fbcb29a1
2 changed files with 1 additions and 3 deletions

View File

@ -8,7 +8,6 @@ import (
"go_dreamfactory/lego/base"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/core/cbase"
"go_dreamfactory/lego/sys/cron"
"go_dreamfactory/lego/sys/event"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/lego/sys/rpcx"
@ -116,7 +115,6 @@ func (this *RPCXService) Destroy() (err error) {
if err = rpcx.Stop(); err != nil {
return
}
cron.Stop()
err = this.ServiceBase.Destroy()
return
}

View File

@ -62,7 +62,7 @@ type Service struct {
func (this *Service) Start() (err error) {
go func() {
if err = this.server.Serve("tcp", this.options.ServiceAddr); err != nil {
this.Errorf("rpcx server exit!")
this.Warnf("rpcx server exit:%v", err)
}
}()
return