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/test
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2015-03-01 01:02:25 +0300
committerFeross Aboukhadijeh <feross@feross.org>2015-03-01 01:02:25 +0300
commit68cffe42d6bdd9dfc1a66b8e1ee0ef1990644d5d (patch)
tree5c63b6220bbfb601a1a46110a251aa76fa6ae68f /test
parent56fcce4366b27ff7be902a283a6073aa9420bac2 (diff)
bittorrent-tracker@3
Diffstat (limited to 'test')
-rw-r--r--test/blocklist-tracker.js3
-rw-r--r--test/download-tracker-magnet.js3
-rw-r--r--test/download-tracker-torrent.js3
3 files changed, 6 insertions, 3 deletions
diff --git a/test/blocklist-tracker.js b/test/blocklist-tracker.js
index 2212c32..eefa338 100644
--- a/test/blocklist-tracker.js
+++ b/test/blocklist-tracker.js
@@ -15,7 +15,8 @@ test('blocklist blocks peers discovered via tracker', function (t) {
tracker: function (cb) {
var tracker = new TrackerServer({ udp: false })
- tracker.listen(function (port) {
+ tracker.listen(function () {
+ var port = tracker.http.address().port
var announceUrl = 'http://127.0.0.1:' + port + '/announce'
// Overwrite announce with our local tracker
diff --git a/test/download-tracker-magnet.js b/test/download-tracker-magnet.js
index 4564a3a..2a47792 100644
--- a/test/download-tracker-magnet.js
+++ b/test/download-tracker-magnet.js
@@ -38,7 +38,8 @@ function magnetDownloadTest (t, serverType) {
trackerStartCount += 1
})
- tracker.listen(function (port) {
+ tracker.listen(function () {
+ var port = tracker[serverType].address().port
var announceUrl = serverType === 'http'
? 'http://127.0.0.1:' + port + '/announce'
: 'udp://127.0.0.1:' + port
diff --git a/test/download-tracker-torrent.js b/test/download-tracker-torrent.js
index f0ecf03..ba3c371 100644
--- a/test/download-tracker-torrent.js
+++ b/test/download-tracker-torrent.js
@@ -37,7 +37,8 @@ function torrentDownloadTest (t, serverType) {
trackerStartCount += 1
})
- tracker.listen(function (port) {
+ tracker.listen(function () {
+ var port = tracker[serverType].address().port
var announceUrl = serverType === 'http'
? 'http://127.0.0.1:' + port + '/announce'
: 'udp://127.0.0.1:' + port