diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2016-04-21 12:50:21 +0300 |
---|---|---|
committer | Feross Aboukhadijeh <feross@feross.org> | 2016-04-21 12:50:21 +0300 |
commit | 597d1ce10ce20ae33b0118d85cfdbc8cbabcb32a (patch) | |
tree | b77b700b39c58c7da5d4abd8b50499cfeeb98fb2 | |
parent | 19617ba502210de4135c2cb1e40c22564d7ee838 (diff) |
Fix one more peer leak
-rw-r--r-- | lib/torrent.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/torrent.js b/lib/torrent.js index 8eb31d0..a105148 100644 --- a/lib/torrent.js +++ b/lib/torrent.js @@ -611,6 +611,7 @@ Torrent.prototype.addPeer = function (peer) { if (host && self.client.blocked.contains(host)) { self._debug('ignoring peer: blocked %s', peer) + if (typeof peer === 'string') peer.destroy() self.emit('blockedPeer', peer) return false } |