Merge pull request #122 from DiegoRBaquero/patch-1

Delete peer on announce stopped
This commit is contained in:
Feross Aboukhadijeh 2016-03-10 21:00:18 -08:00
commit 32c2e985fd

View File

@ -66,7 +66,7 @@ Swarm.prototype._onAnnounceStopped = function (params, peer) {
if (peer.complete) this.complete -= 1 if (peer.complete) this.complete -= 1
else this.incomplete -= 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) { Swarm.prototype._onAnnounceCompleted = function (params, peer) {