From 345da0abcfd5a2364164f391c383f106ad8196b1 Mon Sep 17 00:00:00 2001 From: Julen Garcia Leunda Date: Fri, 30 Oct 2020 12:53:33 +0100 Subject: Apply review suggestions --- lib/torrent.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/torrent.js') 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 -- cgit v1.2.3