]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Ending a conn because we don't like its ID is not an error
authorMatt Joiner <anacrolix@gmail.com>
Tue, 19 Oct 2021 02:37:18 +0000 (13:37 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Tue, 19 Oct 2021 03:07:40 +0000 (14:07 +1100)
(cherry picked from commit 2a5ba846cef9b4e035b3b88698f3e7f7d9d79251)

client.go

index 3aa3ad2516b6ff0dedc86abe18021b26d38db56c..c55eb1a7a0e3342fecf0e6f5c4278fa1a4353d11 100644 (file)
--- a/client.go
+++ b/client.go
@@ -935,7 +935,8 @@ func (cl *Client) runHandshookConn(c *PeerConn, t *Torrent) error {
                        // address, we won't record the remote address as a doppleganger. Instead, the initiator
                        // can record *us* as the doppleganger.
                } */
-               return errors.New("local and remote peer ids are the same")
+               t.logger.WithLevel(log.Debug).Printf("local and remote peer ids are the same")
+               return nil
        }
        c.conn.SetWriteDeadline(time.Time{})
        c.r = deadlineReader{c.conn, c.r}