Skip to content

Commit

Permalink
Export HostClient.connsCount (#981)
Browse files Browse the repository at this point in the history
Export HostClient.connsCount
  • Loading branch information
kiyonlin authored Feb 25, 2021
1 parent a4b0703 commit c3cd5e1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c3cd5e1

Please sign in to comment.