From ed3da2f39b581f9972b73f0ba9e0b43273f68276 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Thu, 2 Feb 2017 17:25:46 -0800 Subject: [PATCH] If peer is already complete, it should still be refreshed in the LRU cache --- 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 f8d8a44..6480052 100644 --- a/lib/server/swarm.js +++ b/lib/server/swarm.js @@ -102,8 +102,8 @@ Swarm.prototype._onAnnounceUpdate = function (params, peer, id) { this.complete += 1 this.incomplete -= 1 peer.complete = true - this.peers.set(id, peer) } + this.peers.set(id, peer) } Swarm.prototype._getPeers = function (numwant, ownPeerId, isWebRTC) {