修改队列的日志

This commit is contained in:
eson 2023-09-08 11:21:38 +08:00
parent 7282835430
commit 5d6ca43c97

View File

@ -41,9 +41,10 @@ func queueHandler(w http.ResponseWriter, r *http.Request) {
}
defer conn.Close()
log.Println("建立连接", DequeueHandler.RefCountAdd(1))
raddr := conn.RemoteAddr()
log.Printf("%s 建立连接 当前unity处理机器数量 %d", raddr, DequeueHandler.RefCountAdd(1))
defer func() {
log.Println("退出连接", DequeueHandler.RefCountAdd(-1))
log.Printf("%s 退出连接 当前unity处理机器数量 %d", raddr, DequeueHandler.RefCountAdd(-1))
}()
for {