Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

torrent-discovery

Package Overview
Dependencies
Maintainers
1
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

torrent-discovery - npm Package Compare versions

Comparing version 3.0.3 to 3.1.0

24

index.js

@@ -8,2 +8,3 @@ module.exports = Discovery

var inherits = require('inherits')
var parallel = require('run-parallel')
var reemit = require('re-emitter')

@@ -77,9 +78,18 @@ var Tracker = require('bittorrent-tracker/client')

var self = this
if (self.tracker) {
if (self.tracker.stop) self.tracker.stop()
if (self.tracker.destroy) self.tracker.destroy()
var tasks = []
if (self.tracker && self.tracker !== true) {
self.tracker.stop()
tasks.push(function (cb) {
self.tracker.destroy(cb)
})
}
if (!self._externalDHT && self.dht && self.dht.destroy) self.dht.destroy(cb)
else process.nextTick(function () { cb(null) })
if (!self._externalDHT && self.dht && self.dht !== true) {
tasks.push(function (cb) {
self.dht.destroy(cb)
})
}
parallel(tasks, cb)
}

@@ -112,4 +122,6 @@

self.tracker = new Tracker(self.peerId, self.port, torrent, trackerOpts)
reemit(self.tracker, self, ['peer', 'warning', 'error'])
self.tracker.on('update', function (data) {
self.emit('trackerAnnounce', data)
})
self.tracker.start()

@@ -116,0 +128,0 @@ }

{
"name": "torrent-discovery",
"description": "Discover BitTorrent and WebTorrent peers",
"version": "3.0.3",
"version": "3.1.0",
"author": {

@@ -22,2 +22,3 @@ "name": "Feross Aboukhadijeh",

"re-emitter": "^1.0.0",
"run-parallel": "^1.1.2",
"xtend": "^4.0.0"

@@ -24,0 +25,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc