Fix for PeerSelection.seedsByAge() for big networks (>1000 Peers)

To get the most(least) recent peers search those with highest(lowest) LastSeen instead of the first by peerhash


git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@8129 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
hermens 13 years ago
parent b5d9f631e3
commit 2ac272cfbf

@ -439,7 +439,7 @@ public class PeerSelection {
final ScoreMap<String> seedScore = new ConcurrentScoreMap<String>();
Seed ys;
long absage;
final Iterator<Seed> s = seedDB.seedsConnected(true, false, null, (float) 0.0);
final Iterator<Seed> s = seedDB.seedsSortedConnected(!up, Seed.LASTSEEN);
int searchcount = 1000;
if (searchcount > seedDB.sizeConnected()) searchcount = seedDB.sizeConnected();
try {

Loading…
Cancel
Save