Add some commented out logging

This commit is contained in:
Matt Joiner 2019-07-19 16:17:38 +10:00
parent f0e7f5e7a0
commit 3c0588d661
1 changed files with 6 additions and 0 deletions

View File

@ -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
}