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:
authorFeross Aboukhadijeh <feross@feross.org>2015-05-30 08:31:53 +0300
committerFeross Aboukhadijeh <feross@feross.org>2015-05-30 08:31:53 +0300
commit38fb984d51a2b45e9c4ea04616944397686d78ee (patch)
treeb767f3f4a5029bd675058aaeb3aa970a38b06046
parent95f7f3f5ca2e88537813c4176d2eeb56b0f06daf (diff)
standard
-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