1
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
昔念
2026-02-02 11:00:37 +08:00
parent aa58dfdbb2
commit ff675f9430
6 changed files with 16 additions and 12 deletions

View File

@@ -12,7 +12,7 @@ import (
"blazing/cool"
"blazing/logic/service/player"
"github.com/gogf/gf/v2/os/glog"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
"github.com/panjf2000/gnet/v2"
)
@@ -78,7 +78,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.Info(context.Background(), gtime.Now().ISO8601(), cool.Config.ServerInfo.OnlineID, "链接数", atomic.LoadInt64(&s.connected))
g.Log().Async().Info(context.Background(), gtime.Now().ISO8601(), cool.Config.ServerInfo.OnlineID, "链接数", atomic.LoadInt64(&s.connected))
if s.quit && atomic.LoadInt64(&s.connected) == 0 {
//执行正常退出逻辑
os.Exit(0)