Skip to content

Commit 32c2e98

Browse files
committed
Merge pull request webtorrent#122 from DiegoRBaquero/patch-1
Delete peer on announce stopped
2 parents 7406750 + e185f32 commit 32c2e98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/server/swarm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Swarm.prototype._onAnnounceStopped = function (params, peer) {
6666

6767
if (peer.complete) this.complete -= 1
6868
else this.incomplete -= 1
69-
this.peers[params.addr || params.peer_id] = null
69+
delete this.peers[params.addr || params.peer_id]
7070
}
7171

7272
Swarm.prototype._onAnnounceCompleted = function (params, peer) {

0 commit comments

Comments
 (0)