This commit is contained in:
@@ -78,7 +78,7 @@ func (s *Server) OnClose(c gnet.Conn, err error) (action gnet.Action) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
func (s *Server) OnTick() (delay time.Duration, action gnet.Action) {
|
func (s *Server) OnTick() (delay time.Duration, action gnet.Action) {
|
||||||
g.Log().Async().Info(context.Background(), gtime.Now().ISO8601(), cool.Config.ServerInfo.OnlineID, "链接数", atomic.LoadInt64(&s.connected))
|
g.Log().Async().Info(context.Background(), gtime.Now().ISO8601(), "服务器ID", cool.Config.ServerInfo.OnlineID, "链接数", atomic.LoadInt64(&s.connected))
|
||||||
if s.quit && atomic.LoadInt64(&s.connected) == 0 {
|
if s.quit && atomic.LoadInt64(&s.connected) == 0 {
|
||||||
//执行正常退出逻辑
|
//执行正常退出逻辑
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user