mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-01-19 04:31:36 +00:00
actually iterate over ipv6 peers
This commit is contained in:
parent
0c709523df
commit
0b831d2fde
@ -512,10 +512,10 @@ Tracker.prototype._handleResponse = function (requestUrl, data) {
|
||||
})
|
||||
} else if (Array.isArray(data.peers6)) {
|
||||
// tracker returned normal response
|
||||
data.peers.forEach(function (peer) {
|
||||
var ip = /^\[/.test(peer.ip)
|
||||
? peer.ip
|
||||
: '[' + peer.ip + ']'
|
||||
data.peers6.forEach(function (peer) {
|
||||
self.client.emit('peer', ip + ':' + peer.port)
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user