From a673267fd31ed5c7012c8f0f975b225944b97e79 Mon Sep 17 00:00:00 2001 From: fengyarnom Date: Thu, 15 May 2025 18:26:50 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9TCP=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E9=80=BB=E8=BE=91=201.=20=E4=BF=AE=E6=94=B9TCP?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E9=80=BB=E8=BE=91=202.=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=9C=80=E6=96=B0=E6=95=B0=E6=8D=AE=E7=9A=84?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/tcp/sensor.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/tcp/sensor.go b/internal/tcp/sensor.go index a98fc14..c1fab75 100644 --- a/internal/tcp/sensor.go +++ b/internal/tcp/sensor.go @@ -66,8 +66,8 @@ func removeConnection(addr string) { logger.Logger.Printf("移除连接: %s, 当前连接数: %d", addr, len(activeConnections.conns)) } -// 获取活跃连接数量 -func getActiveConnectionCount() int { +// GetActiveConnectionCount 获取活跃连接数量 +func GetActiveConnectionCount() int { activeConnections.mu.RLock() defer activeConnections.mu.RUnlock()