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
diff options
context:
space:
mode:
-rw-r--r--lib/torrent.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/torrent.js b/lib/torrent.js
index 97ee244..e25fd63 100644
--- a/lib/torrent.js
+++ b/lib/torrent.js
@@ -372,9 +372,8 @@ Torrent.prototype.destroy = function (cb) {
Torrent.prototype.addPeer = function (peer) {
var self = this
// TODO: extract IP address from peer object and check blocklist
- if (typeof peer === 'string'
- && self.client.blocked
- && self.client.blocked.contains(addrToIPPort(peer)[0])) {
+ if (typeof peer === 'string' && self.client.blocked &&
+ self.client.blocked.contains(addrToIPPort(peer)[0])) {
self.numBlockedPeers += 1
self.emit('blockedPeer', peer)
return false