日志优化

This commit is contained in:
hahwu 2025-12-31 12:01:15 +08:00
parent ed7ec40d34
commit 4b471ad95d

View File

@ -2,6 +2,7 @@ package network
import ( import (
"net" "net"
"server/conf"
"server/pkg/github.com/name5566/leaf/log" "server/pkg/github.com/name5566/leaf/log"
"sync" "sync"
"time" "time"
@ -83,7 +84,9 @@ func (server *TCPServer) run() {
return return
} }
tempDelay = 0 tempDelay = 0
if conf.Server.ServerType == "center" {
log.Debug("accept connection from %v", conn.RemoteAddr())
}
server.mutexConns.Lock() server.mutexConns.Lock()
if len(server.conns) >= server.MaxConnNum { if len(server.conns) >= server.MaxConnNum {
server.mutexConns.Unlock() server.mutexConns.Unlock()