From 3c0588d6614f8a7067ca6a984064dedc1ed4d146 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Fri, 19 Jul 2019 16:17:38 +1000 Subject: [PATCH] Add some commented out logging --- client.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client.go b/client.go index ecedccfe..5b7831cc 100644 --- a/client.go +++ b/client.go @@ -520,6 +520,7 @@ func (cl *Client) dialFirst(ctx context.Context, addr string) dialResult { return } left++ + //cl.logger.Printf("dialing %s on %s/%s", addr, s.Addr().Network(), s.Addr()) go func() { resCh <- dialResult{ cl.dialFromSocket(ctx, s, addr), @@ -550,6 +551,11 @@ func (cl *Client) dialFirst(ctx context.Context, addr string) dialResult { if res.Conn != nil { go torrent.Add(fmt.Sprintf("network dialed first: %s", res.Conn.RemoteAddr().Network()), 1) } + //if res.Conn != nil { + // cl.logger.Printf("first connection for %s from %s/%s", addr, res.Conn.LocalAddr().Network(), res.Conn.LocalAddr().String()) + //} else { + // cl.logger.Printf("failed to dial %s", addr) + //} return res } -- 2.48.1