fix 日志的打印错误
This commit is contained in:
parent
6a93dc60a7
commit
5091a1018c
|
@ -42,6 +42,7 @@ func queueHandler(w http.ResponseWriter, r *http.Request) {
|
|||
defer conn.Close()
|
||||
|
||||
raddr := conn.RemoteAddr()
|
||||
// laddr := conn.LocalAddr()
|
||||
log.Printf("%s 建立连接 当前unity处理机器数量 %d", raddr, DequeueHandler.RefCountAdd(1))
|
||||
defer func() {
|
||||
log.Printf("%s 退出连接 当前unity处理机器数量 %d", raddr, DequeueHandler.RefCountAdd(-1))
|
||||
|
@ -50,7 +51,6 @@ func queueHandler(w http.ResponseWriter, r *http.Request) {
|
|||
for {
|
||||
|
||||
item := <-PopChannel
|
||||
|
||||
if item == nil {
|
||||
continue
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ func queueHandler(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
// 打印消息
|
||||
fmt.Printf("%s 的数据 推送到unity. source: [%s]\n", conn.RemoteAddr(), item.Source)
|
||||
fmt.Printf("数据 推送到unity %s. source: [%s]\n", raddr, item.Source)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user