关闭服务时,书写重复代码
未关闭
- 主要语言
- Go
- 星标
- 7.8k
- 派生
- 1.3k
- PR 合并指标
- 30 天内没有已合并 PR
描述
```ruby
func (s *Server) Stop() {
zlog.Ins().InfoF("[STOP] Zinx server , name %s", s.Name)
// Clear other connection information or other information that needs to be cleaned up
// (将其他需要清理的连接信息或者其他信息 也要一并停止或者清理)
s.ConnMgr.ClearConn()
s.exitChan <- struct{}{}
close(s.exitChan)
}
```
其实只需要close(s.exitChan),不需要在投递一个struct{}{},重复书写代码
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。