Revert "优化服务退出流程,增加中间件文档"

This reverts commit c511a2e6b3.
This commit is contained in:
maxbad
2023-05-15 23:15:17 +08:00
parent c981d0b8eb
commit 64ed43b7ca
30 changed files with 98 additions and 336 deletions

View File

@@ -53,17 +53,15 @@ func (s *sTCPServer) Start(ctx context.Context) {
})
// 服务监听
if err = s.serv.Listen(); err != nil {
if !s.serv.IsClose() {
g.Log().Warningf(ctx, "TCPServer Listen err:%v", err)
}
if err := s.serv.Listen(); err != nil {
g.Log().Warningf(ctx, "TCPServer Listen err:%v", err)
}
})
}
// Stop 关闭服务
func (s *sTCPServer) Stop(ctx context.Context) {
if s.serv != nil && !s.serv.IsClose() {
if s.serv != nil {
s.serv.Close()
g.Log().Debug(ctx, "TCPServer stop..")
}