```
fix(socket): 修改服务器事件中的连接数日志描述 将 OnTick 方法中的日志输出从 "[connected-count=%v]" 更改为更直观的 "链接数" 描述, 便于理解和调试连接状态。 ```
This commit is contained in:
@@ -77,7 +77,7 @@ func (s *Server) OnClose(c gnet.Conn, err error) (action gnet.Action) {
|
||||
return
|
||||
}
|
||||
func (s *Server) OnTick() (delay time.Duration, action gnet.Action) {
|
||||
glog.Infof(context.Background(), gtime.Now().ISO8601(), "[connected-count=%v]", atomic.LoadInt64(&s.connected))
|
||||
glog.Infof(context.Background(), gtime.Now().ISO8601(), "链接数", atomic.LoadInt64(&s.connected))
|
||||
if s.quit && atomic.LoadInt64(&s.connected) == 0 {
|
||||
//执行正常退出逻辑
|
||||
os.Exit(0)
|
||||
|
||||
Reference in New Issue
Block a user