]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Add establish outgoing connection expvar
authorMatt Joiner <anacrolix@gmail.com>
Sun, 4 Nov 2018 05:12:16 +0000 (16:12 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Sun, 4 Nov 2018 05:12:16 +0000 (16:12 +1100)
client.go

index f1cb3635da4bb19bd92481f3e8647d257e6543be..036154ab092e8606725a86b806ba7a02e187eee3 100644 (file)
--- a/client.go
+++ b/client.go
@@ -624,6 +624,7 @@ func (cl *Client) establishOutgoingConnEx(t *Torrent, addr string, ctx context.C
 // Returns nil connection and nil error if no connection could be established
 // for valid reasons.
 func (cl *Client) establishOutgoingConn(t *Torrent, addr string) (c *connection, err error) {
+       torrent.Add("establish outgoing connection", 1)
        ctx, cancel := context.WithTimeout(context.Background(), func() time.Duration {
                cl.rLock()
                defer cl.rUnlock()