mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-01-31 02:21:36 +00:00
Bugfix in manual peer eviction.
This commit is contained in:
parent
7f98203d5e
commit
5843b7d2f6
@ -119,7 +119,7 @@ Swarm.prototype._getPeers = function (numwant, ownPeerId, isWebRTC) {
|
|||||||
var peerId
|
var peerId
|
||||||
while ((peerId = ite()) && peers.length < numwant) {
|
while ((peerId = ite()) && peers.length < numwant) {
|
||||||
// Check manually if the peer is active
|
// Check manually if the peer is active
|
||||||
if (peers.maxAge && (Date.now() - peers.cache[peerId].modified) > peers.maxAge) {
|
if (this.peers.maxAge && (Date.now() - this.peers.cache[peerId].modified) > this.peers.maxAge) {
|
||||||
peers.remove(peerId)
|
peers.remove(peerId)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user