From ff7934e1c6d30b0834cf0e009bfa1af4b7641f1d Mon Sep 17 00:00:00 2001 From: eson <9673575+githubcontent@user.noreply.gitee.com> Date: Tue, 14 Nov 2023 11:54:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=95=B4=E7=9A=84=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- websocket.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/websocket.go b/websocket.go index 70837bd..8073467 100644 --- a/websocket.go +++ b/websocket.go @@ -119,9 +119,10 @@ func queueHandler(w http.ResponseWriter, r *http.Request) { return } - countPutPop.Use(func(item *CountPutPop) { - item.PopCount++ - item.SelfCount[raddr.String()]++ + countPutPop.Use(func(citem *CountPutPop) { + citem.PopCount++ + citem.SelfCount[raddr.String()]++ + log.Printf("all put %d, all pop %d source[%s] -> self[%s] pop %d\n", citem.PutCount, citem.PopCount, item.Source, raddr.String(), citem.SelfCount[raddr.String()]) }) logIntervalTimeHandler.Notify(countPutPop) // 打印消息