diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2016-05-05 01:42:44 +0300 |
---|---|---|
committer | Feross Aboukhadijeh <feross@feross.org> | 2016-05-05 01:42:44 +0300 |
commit | b276d8e1762da6d4f224745f1c27cea39a09b5bf (patch) | |
tree | e5504349853e263d4182e30368014e536fc1a69a | |
parent | e3b50226c1f51be33dd9b9f6f88310c1cf29254c (diff) |
torrent.pause: Fix peer._destroy is not a function
Closes #784
-rw-r--r-- | lib/torrent.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/torrent.js b/lib/torrent.js index 36f15f0..d4c55e3 100644 --- a/lib/torrent.js +++ b/lib/torrent.js @@ -712,8 +712,8 @@ Torrent.prototype.addWebSeed = function (url) { */ Torrent.prototype._addIncomingPeer = function (peer) { var self = this - if (self.destroyed) return peer._destroy(new Error('torrent is destroyed')) - if (self.paused) return peer._destroy(new Error('torrent is paused')) + if (self.destroyed) return peer.destroy(new Error('torrent is destroyed')) + if (self.paused) return peer.destroy(new Error('torrent is paused')) this._debug('add incoming peer %s', peer.id) |