diff --git a/test/client.js b/test/client.js index f069159..ea022bf 100644 --- a/test/client.js +++ b/test/client.js @@ -9,7 +9,6 @@ var parsedTorrent = parseTorrent(torrent) var peerId1 = new Buffer('01234567890123456789') var peerId2 = new Buffer('12345678901234567890') var peerId3 = new Buffer('23456789012345678901') -var announceUrl = '' var port = 6881 function testClientStart (t, serverType) { diff --git a/test/common.js b/test/common.js index 5adf94a..bfbb944 100644 --- a/test/common.js +++ b/test/common.js @@ -16,7 +16,7 @@ exports.createServer = function (t, serverType, cb) { portfinder.getPort(function (err, port) { if (err) return t.error(err) - announceUrl = serverType === 'http' + var announceUrl = serverType === 'http' ? 'http://127.0.0.1:' + port + '/announce' : 'udp://127.0.0.1:' + port