swarm maxAge: increase to 20 min

This commit is contained in:
Feross Aboukhadijeh 2017-02-02 17:40:52 -08:00
parent 6351f2b260
commit 8f33b95f9f

View File

@ -9,7 +9,7 @@ var randomIterate = require('random-iterate')
function Swarm (infoHash, server) { function Swarm (infoHash, server) {
this.peers = new LRU({ this.peers = new LRU({
max: server.peersCacheLength || 1000, max: server.peersCacheLength || 1000,
maxAge: server.peersCacheTtl || 900000 // 900 000ms = 15 minutes maxAge: server.peersCacheTtl || 20 * 60 * 1000 // 20 minutes
}) })
this.complete = 0 this.complete = 0
this.incomplete = 0 this.incomplete = 0