func (t *Torrent) consumeDhtAnnouncePeers(pvs <-chan dht.PeersValues) {
	cl := t.cl
	for v := range pvs {
		cl.lock()
		for _, cp := range v.Peers {
			if cp.Port == 0 {
				// Can't do anything with this.
				continue
			}
			t.addPeer(Peer{
				Addr:   ipPortAddr{cp.IP, cp.Port},
				Source: PeerSourceDhtGetPeers,
			})
		}
		cl.unlock()
	}
}
// Adds peers revealed in an announce until the announce ends, or we have
// enough peers.
Adds peers revealed in an announce until the announce ends, or we have
enough peers.
// Adds peers revealed in an announce until the announce ends or we have // enough peers .
func (t *Torrent) consumeDhtAnnouncePeers(pvs <-chan dht.PeersValues) {
	cl := t.cl
	for v := range pvs {
		cl.lock()
		for _, cp := range v.Peers {
			if cp.Port == 0 {
				continue
			}
			t.addPeer(Peer{
				Addr:   ipPortAddr{cp.IP, cp.Port},
				Source: PeerSourceDhtGetPeers,
			})
		}
		cl.unlock()
	}
}
func ( t * Torrent ) consumeDhtAnnouncePeers ( pvs <- chan dht . PeersValues ) { cl := t . cl for v := range pvs { cl . lock ( ) for _ , cp := range v . Peers { if cp . Port == 0 { continue } t . addPeer ( Peer { Addr : ipPortAddr { cp . IP , cp . Port } , Source : PeerSourceDhtGetPeers , } ) } cl . unlock ( ) } }
Adds peers revealed in an announce until the announce ends, or we have
enough peers.
Adds peers revealed in an announce until the announce ends or we have enough peers .
// Can't do anything with this.