Skip to content

Commit 5843b7d

Browse files
committed
Bugfix in manual peer eviction.
1 parent 7f98203 commit 5843b7d

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
@@ -119,7 +119,7 @@ Swarm.prototype._getPeers = function (numwant, ownPeerId, isWebRTC) {
119119
var peerId
120120
while ((peerId = ite()) && peers.length < numwant) {
121121
// Check manually if the peer is active
122-
if (peers.maxAge && (Date.now() - peers.cache[peerId].modified) > peers.maxAge) {
122+
if (this.peers.maxAge && (Date.now() - this.peers.cache[peerId].modified) > this.peers.maxAge) {
123123
peers.remove(peerId)
124124
continue
125125
}

0 commit comments

Comments
 (0)