diff --git a/client.go b/client.go index 1885d0a23b..80684c3910 100644 --- a/client.go +++ b/client.go @@ -1693,6 +1693,14 @@ func (c *HostClient) decConnsCount() { } +// ConnsCount returns connection count of HostClient +func (c *HostClient) ConnsCount() int { + c.connsLock.Lock() + defer c.connsLock.Unlock() + + return c.connsCount +} + func acquireClientConn(conn net.Conn) *clientConn { v := clientConnPool.Get() if v == nil {