* data/blob: Deleting incomplete data triggers io.ErrUnexpectedEOF that isn't recovered from.
* UL/DL rate-limiting.
* Handle Torrent being dropped before GotInfo.
+ * Punish sources of bad peers? Some trackers, PEX, and DHT give port 0s, which seems lousy. The spec suggests maybe to not worry about it, but some sources are very persistent.
me.mu.Lock()
me.addPeers(t, func() (ret []Peer) {
for i, cp := range pexMsg.Added {
- if cp.Port == 0 {
- log.Printf("peer gave zero port peer over PEX\n\t%s", c)
- continue
- }
p := Peer{
IP: make([]byte, 4),
Port: int(cp.Port),
continue
}
if p.Port == 0 {
- log.Printf("got bad peer: %v", p)
+ // The spec says to scrub these yourselves. Fine.
continue
}
t.addPeer(p)