diff --git a/websocket.go b/websocket.go index 7ae390e..e67e2b8 100644 --- a/websocket.go +++ b/websocket.go @@ -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 {