Compare commits

...

2 Commits

Author SHA1 Message Date
eson
6a93dc60a7 fix 2023-09-08 11:32:58 +08:00
eson
5d6ca43c97 修改队列的日志 2023-09-08 11:21:38 +08:00

View File

@ -41,9 +41,10 @@ func queueHandler(w http.ResponseWriter, r *http.Request) {
} }
defer conn.Close() defer conn.Close()
log.Println("建立连接", DequeueHandler.RefCountAdd(1)) raddr := conn.RemoteAddr()
log.Printf("%s 建立连接 当前unity处理机器数量 %d", raddr, DequeueHandler.RefCountAdd(1))
defer func() { defer func() {
log.Println("退出连接", DequeueHandler.RefCountAdd(-1)) log.Printf("%s 退出连接 当前unity处理机器数量 %d", raddr, DequeueHandler.RefCountAdd(-1))
}() }()
for { for {
@ -86,7 +87,7 @@ func queueHandler(w http.ResponseWriter, r *http.Request) {
} }
// 打印消息 // 打印消息
fmt.Printf("%s 的数据 推送到unity. source %s\n", conn.RemoteAddr(), item.Source) fmt.Printf("%s 的数据 推送到unity. source: [%s]\n", conn.RemoteAddr(), item.Source)
} }
} }