From 8de791079c4116cb86f4b8583edbb036560cb7c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Sun, 19 Dec 2021 16:54:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/nodes/node.go | 1 + internal/ratelimit/counter.go | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/nodes/node.go b/internal/nodes/node.go index 64e8a8f..d01f6ea 100644 --- a/internal/nodes/node.go +++ b/internal/nodes/node.go @@ -632,6 +632,7 @@ func (this *Node) listenSock() error { "ipConns": ipConns, "serverConns": serverConns, "total": sharedListenerManager.TotalActiveConnections(), + "limiter": sharedConnectionsLimiter.Len(), }, }) } diff --git a/internal/ratelimit/counter.go b/internal/ratelimit/counter.go index 7bf012a..3c2cc4b 100644 --- a/internal/ratelimit/counter.go +++ b/internal/ratelimit/counter.go @@ -27,7 +27,6 @@ func (this *Counter) Count() int { } // Len 已占用数量 -// 注意:非线程安全 func (this *Counter) Len() int { return len(this.sem) }