Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2015-03-04 22:38:03 +0300
committerFeross Aboukhadijeh <feross@feross.org>2015-03-04 22:38:03 +0300
commit4f79919b455d766521a861f2469b6a5175ab733b (patch)
tree857ca46657fc607d1701768af5eaa0c80c54c20e /lib
parent2c80448e3e2f32f3d75b33e69ff59e5488aa3618 (diff)
bittorrent-dht@3
Diffstat (limited to 'lib')
-rw-r--r--lib/torrent.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/torrent.js b/lib/torrent.js
index db30e0e..9b7dd34 100644
--- a/lib/torrent.js
+++ b/lib/torrent.js
@@ -464,8 +464,8 @@ Torrent.prototype._onWire = function (wire) {
wire.setKeepAlive(true)
// If peer supports DHT, send PORT message to report DHT node listening port
- if (wire.peerExtensions.dht && self.client.dht && self.client.dht.port) {
- wire.port(self.client.dht.port)
+ if (wire.peerExtensions.dht && self.client.dht && self.client.dht.listening) {
+ wire.port(self.client.dht.address().port)
}
// When peer sends PORT, add them to the routing table