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>2015-07-27 02:32:24 +0300
committerFeross Aboukhadijeh <feross@feross.org>2015-07-27 02:32:24 +0300
commit80621cdae06491a88583987a63237b29bdfe62d4 (patch)
tree277cac54e9891347173d16cc9ad4dbd4d66f9172 /lib
parentcb5c9a430c53d5cfd5e7db2ef2e0bdba7ec2013d (diff)
emit 'peer' event later
Diffstat (limited to 'lib')
-rw-r--r--lib/torrent.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/torrent.js b/lib/torrent.js
index 9f8cc2d..214b49a 100644
--- a/lib/torrent.js
+++ b/lib/torrent.js
@@ -395,8 +395,8 @@ Torrent.prototype.addPeer = function (peer) {
var self = this
function addPeer () {
- self.emit('peer', peer)
self.swarm.addPeer(peer)
+ self.emit('peer', peer)
}
// TODO: extract IP address from peer object and check blocklist