From 8030ed3319d17fca45bc0e4a92f52696fc44303b Mon Sep 17 00:00:00 2001 From: orbiter Date: Thu, 18 Feb 2010 21:55:45 +0000 Subject: [PATCH] self-healing for lost crawl profile handles git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6680 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- .project | 50 +++++++++++++----------- source/de/anomic/search/Switchboard.java | 5 ++- 2 files changed, 32 insertions(+), 23 deletions(-) diff --git a/.project b/.project index 2ef8b129c..84d4a43ce 100644 --- a/.project +++ b/.project @@ -1,22 +1,28 @@ - - - yacy - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.validation.validationbuilder - - - - - - org.eclipse.jdt.core.javanature - - + + + yacy + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + net.sourceforge.pmd.eclipse.plugin.pmdBuilder + + + + + + org.eclipse.jdt.core.javanature + net.sourceforge.pmd.eclipse.plugin.pmdNature + + diff --git a/source/de/anomic/search/Switchboard.java b/source/de/anomic/search/Switchboard.java index f084c16d4..9c92c51bb 100644 --- a/source/de/anomic/search/Switchboard.java +++ b/source/de/anomic/search/Switchboard.java @@ -1341,7 +1341,10 @@ public final class Switchboard extends serverSwitch { while (it.hasNext()) { selentry = it.next(); assert selentry.handle() != null : "profile.name = " + selentry.name(); - if (selentry.handle() == null) continue; + if (selentry.handle() == null) { + it.remove(); + continue; + } if (selentry.name().equals(CrawlSwitchboard.CRAWL_PROFILE_PROXY)) crawler.profilesActiveCrawls.changeEntry(selentry, CrawlProfile.entry.RECRAWL_IF_OLDER, Long.toString(crawler.profilesActiveCrawls.getRecrawlDate(CrawlSwitchboard.CRAWL_PROFILE_PROXY_RECRAWL_CYCLE)));