From abfa44d6e4e16d71dcf1b22e5fd05c8f008e200a Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Tue, 18 Nov 2014 14:31:47 -0600 Subject: [PATCH] Count accepted connections --- client.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client.go b/client.go index 049136bf..dcc44e42 100644 --- a/client.go +++ b/client.go @@ -59,6 +59,7 @@ var ( failedPieceHashes = expvar.NewInt("failedPieceHashes") unsuccessfulDials = expvar.NewInt("unsuccessfulDials") successfulDials = expvar.NewInt("successfulDials") + acceptedConns = expvar.NewInt("acceptedConns") ) const ( @@ -342,6 +343,7 @@ func (cl *Client) acceptConnections(l net.Listener, utp bool) { log.Print(err) return } + acceptedConns.Add(1) go func() { if err := cl.runConnection(conn, nil, peerSourceIncoming, utp); err != nil { log.Print(err) -- 2.48.1