代码规范过滤,移除冗余代码,替换掉不推荐的包

This commit is contained in:
孟帅
2023-05-30 12:09:40 +08:00
parent c8a808fcfd
commit b2ef3487d3
74 changed files with 564 additions and 741 deletions

View File

@@ -79,20 +79,18 @@ var (
// 信号监听
signalListen(ctx, signalHandlerForOverall)
go func() {
select {
case <-serverCloseSignal:
websocket.Stop()
service.TCPServer().Stop(ctx)
s.Shutdown() // 主服务建议放在最后一个关闭
g.Log().Debug(ctx, "http successfully closed ..")
serverWg.Done()
}
<-serverCloseSignal
websocket.Stop()
service.TCPServer().Stop(ctx)
_ = s.Shutdown() // 主服务建议放在最后一个关闭
g.Log().Debug(ctx, "http successfully closed ..")
serverWg.Done()
}()
// Just run the server.
s.Run()
return
},
}