From: Matt Joiner Date: Sun, 4 Nov 2018 05:12:16 +0000 (+1100) Subject: Add establish outgoing connection expvar X-Git-Tag: v1.0.0~30 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=9a49f4b37ed4a1f62a3d7d0be66f0ab301091bbf;p=btrtrc.git Add establish outgoing connection expvar --- diff --git a/client.go b/client.go index f1cb3635..036154ab 100644 --- 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()