Attempt to fix the "lost profile handle" bug.

It seems improbable, but it might happen, that during a crawl all queues (indexing, crawling, ...) except the crawl URL stacker ran empty. This commit adds an additional check for an empty crawl stacker queue before executing the profile cleaner.

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4151 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
fuchsi 18 years ago
parent 905e7e60f5
commit 70614385ef

@ -1629,7 +1629,9 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
* shutdown procedure
*/
public boolean cleanProfiles() throws InterruptedException {
if ((sbQueue.size() > 0) || (cacheLoader.size() > 0) || (noticeURL.notEmpty())) return false;
if ((sbQueue.size() > 0) || (cacheLoader.size() > 0) ||
(sbStackCrawlThread.size() > 0) || (noticeURL.notEmpty()))
return false;
final Iterator iter = profilesActiveCrawls.profiles(true);
plasmaCrawlProfile.entry entry;
boolean hasDoneSomething = false;

Loading…
Cancel
Save