diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2015-05-18 02:35:11 +0300 |
---|---|---|
committer | Feross Aboukhadijeh <feross@feross.org> | 2015-05-18 02:35:11 +0300 |
commit | 4309d70fb2473e0097bed3b0b7525579de4a52a4 (patch) | |
tree | 02aaadd20685170b4a7ce10d2d926b3f4e8fdbc4 /index.js | |
parent | 1dae3cba494c0371012a8b781573279af4c75fe9 (diff) |
remove torrent from client on fatal torrent error
also, fixed a bug with choking where we were inspecting wire._destroyed
instead of wire.destroyed.
Diffstat (limited to 'index.js')
-rw-r--r-- | index.js | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -168,6 +168,7 @@ WebTorrent.prototype.download = function (torrentId, opts, ontorrent) { torrent.on('error', function (err) { self.emit('error', err, torrent) + self.remove(torrent) }) torrent.on('listening', function (port) { @@ -231,7 +232,7 @@ WebTorrent.prototype.seed = function (input, opts, onseed) { /** * Remove a torrent from the client. - * @param {string|Buffer} torrentId + * @param {string|Buffer|Torrent} torrentId * @param {function} cb */ WebTorrent.prototype.remove = function (torrentId, cb) { |