File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ function Swarm (infoHash, server) {
1414 self . incomplete = 0
1515
1616 self . peers = new LRU ( {
17- max : server . peersCacheLength || 1000 ,
18- maxAge : server . peersCacheTtl || 20 * 60 * 1000 // 20 minutes
17+ max : 1000 ,
18+ maxAge : 20 * 60 * 1000 // 20 minutes
1919 } )
2020
2121 // When a peer is evicted from the LRU store, send a synthetic 'stopped' event
Original file line number Diff line number Diff line change @@ -509,7 +509,7 @@ class Server extends EventEmitter {
509509 debug ( 'got candidate from %s to %s' , params . peer_id , params . to_peer_id )
510510 debug ( 'peers length %s' , peers . length )
511511 debug ( 'got %s peers from swarm %s' , peers . length , params . info_hash )
512- this . getSwarm ( params . info_hash , function ( err , swarm ) {
512+ this . getSwarm ( params . info_hash , ( err , swarm ) => {
513513 if ( this . destroyed ) return
514514 if ( err ) return this . emit ( 'warning' , err )
515515 if ( ! swarm ) {
You can’t perform that action at this time.
0 commit comments