diff options
author | Julen Garcia Leunda <hicom150@gmail.com> | 2020-10-30 14:53:33 +0300 |
---|---|---|
committer | Julen Garcia Leunda <hicom150@gmail.com> | 2020-10-31 02:25:51 +0300 |
commit | 345da0abcfd5a2364164f391c383f106ad8196b1 (patch) | |
tree | 03f3ac22714648ee4a6f8330d0880223dfb3562f /lib/torrent.js | |
parent | 271bb563a76b32fcc891c4f7084063ad1dd42ef4 (diff) |
Apply review suggestions
Diffstat (limited to 'lib/torrent.js')
-rw-r--r-- | lib/torrent.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/torrent.js b/lib/torrent.js index aa46009..077edcb 100644 --- a/lib/torrent.js +++ b/lib/torrent.js @@ -323,10 +323,8 @@ class Torrent extends EventEmitter { } // add BEP09 peer-address - // TODO: It should only be included if the client can discover its public IP address and determine its reachability. - if (this.peerAddress) { - const peers = Array.isArray(this.peerAddress) ? this.peerAddress : [this.peerAddress] - peers.forEach(peer => this.addPeer(peer)) + if (this.peerAddresses) { + this.peerAddresses.forEach(peer => this.addPeer(peer)) } // begin discovering peers via DHT and trackers |