优化代码

This commit is contained in:
GoEdgeLab
2021-12-19 16:54:56 +08:00
parent 8d4c2b0fe0
commit d83f1bcb8b
2 changed files with 1 additions and 1 deletions

View File

@@ -632,6 +632,7 @@ func (this *Node) listenSock() error {
"ipConns": ipConns, "ipConns": ipConns,
"serverConns": serverConns, "serverConns": serverConns,
"total": sharedListenerManager.TotalActiveConnections(), "total": sharedListenerManager.TotalActiveConnections(),
"limiter": sharedConnectionsLimiter.Len(),
}, },
}) })
} }

View File

@@ -27,7 +27,6 @@ func (this *Counter) Count() int {
} }
// Len 已占用数量 // Len 已占用数量
// 注意:非线程安全
func (this *Counter) Len() int { func (this *Counter) Len() int {
return len(this.sem) return len(this.sem)
} }