From e185f321d39ca99cb34797967403e86f70709323 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Rodr=C3=ADguez=20Baquero?= Date: Fri, 11 Mar 2016 01:10:34 -0300 Subject: [PATCH] Delete peer on announce stopped --- lib/server/swarm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/server/swarm.js b/lib/server/swarm.js index 8d2765c..cc865f1 100644 --- a/lib/server/swarm.js +++ b/lib/server/swarm.js @@ -66,7 +66,7 @@ Swarm.prototype._onAnnounceStopped = function (params, peer) { if (peer.complete) this.complete -= 1 else this.incomplete -= 1 - this.peers[params.addr || params.peer_id] = null + delete this.peers[params.addr || params.peer_id] } Swarm.prototype._onAnnounceCompleted = function (params, peer) {