Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2016-04-21 12:50:21 +0300
committerFeross Aboukhadijeh <feross@feross.org>2016-04-21 12:50:21 +0300
commit597d1ce10ce20ae33b0118d85cfdbc8cbabcb32a (patch)
treeb77b700b39c58c7da5d4abd8b50499cfeeb98fb2 /lib
parent19617ba502210de4135c2cb1e40c22564d7ee838 (diff)
Fix one more peer leak
Diffstat (limited to 'lib')
-rw-r--r--lib/torrent.js1
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
}