client.go | 6 +++++- diff --git a/client.go b/client.go index 5caaf76a5d2c23a24112cd5711ee14069af8e16a..3b36a19dae892710f17514b5ffc1dc6e3c0dde20 100644 --- a/client.go +++ b/client.go @@ -714,6 +714,7 @@ } return } +// Returns whether an address is known to connect to a client with our own ID. func (me *Client) dopplegangerAddr(addr string) bool { _, ok := me.dopplegangerAddrs[addr] return ok @@ -1838,7 +1839,10 @@ } func (me *Client) addPeers(t *torrent, peers []Peer) { for _, p := range peers { - if me.dopplegangerAddr(net.JoinHostPort(p.IP.String(), strconv.FormatInt(int64(p.Port), 10))) { + if me.dopplegangerAddr(net.JoinHostPort( + p.IP.String(), + strconv.FormatInt(int64(p.Port), 10), + )) { continue } if me.ipBlockRange(p.IP) != nil {