From 958ebea5c5704f255bc55bd87f1e30e260d98c84 Mon Sep 17 00:00:00 2001 From: orbiter Date: Wed, 7 Mar 2007 09:08:13 +0000 Subject: [PATCH] fix for http://www.yacy-forum.de/viewtopic.php?p=32470#32470 git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3437 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/plasma/plasmaCrawlBalancer.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/de/anomic/plasma/plasmaCrawlBalancer.java b/source/de/anomic/plasma/plasmaCrawlBalancer.java index a99be7c66..e01753e11 100644 --- a/source/de/anomic/plasma/plasmaCrawlBalancer.java +++ b/source/de/anomic/plasma/plasmaCrawlBalancer.java @@ -303,7 +303,12 @@ public class plasmaCrawlBalancer { // 3rd: take entry from file if ((result == null) && (fileStack.size() > 0)) { kelondroRow.Entry topentry = fileStack.top(); - if (topentry != null) { + if (topentry == null) { + // emergency case: this means that something with the stack organization is wrong + // the file appears to be broken. We kill the file. + kelondroStack.reset(fileStack); + serverLog.logSevere("PLASMA BALANCER", "get() failed to fetch entry from file stack. reset stack file."); + } else { String top = new String(topentry.getColBytes(0)); // check if the time after retrieval of last hash from same