From 6faa26225927990a661c693bbe55fa836cbb43cf Mon Sep 17 00:00:00 2001 From: orbiter Date: Fri, 9 Mar 2007 14:30:53 +0000 Subject: [PATCH] fix for NURL-fix git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3465 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/plasma/plasmaCrawlNURL.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/source/de/anomic/plasma/plasmaCrawlNURL.java b/source/de/anomic/plasma/plasmaCrawlNURL.java index 1feb2dcce..853702436 100644 --- a/source/de/anomic/plasma/plasmaCrawlNURL.java +++ b/source/de/anomic/plasma/plasmaCrawlNURL.java @@ -392,14 +392,16 @@ public class plasmaCrawlNURL { re = stack.pop(); if (re == null) { if (s > stack.size()) continue; - throw new IOException("hash is null"); + stack = kelondroStack.reset(stack); // the stack is not able to shrink + throw new IOException("hash is null, stack cannot shrink; reset of stack (1)"); } try { entry = new Entry(new String(re.getColBytes(0))); } catch (IOException e) { serverLog.logWarning("NURL", e.getMessage()); if (s > stack.size()) continue; - throw new IOException(e.getMessage()); + stack = kelondroStack.reset(stack); // the stack is not able to shrink + throw new IOException("hash is null, stack cannot shrink; reset of stack (2)"); } imageStackIndex.remove(entry.hash); movieStackIndex.remove(entry.hash); @@ -418,14 +420,16 @@ public class plasmaCrawlNURL { hash = balancer.pop(minimumDelta, maximumDomAge); if (hash == null) { if (s > balancer.size()) continue; - throw new IOException("hash is null"); + balancer.clear(); // the balancer is broken and cannot shrink + throw new IOException("hash is null, balancer cannot shrink; reset of balancer (1)"); } try { entry = new Entry(hash); } catch (IOException e) { serverLog.logWarning("NURL", e.getMessage()); if (s > balancer.size()) continue; - throw new IOException(e.getMessage()); + balancer.clear(); // the balancer is broken and cannot shrink + throw new IOException("hash is null, balancer cannot shrink; reset of balancer (2)"); } imageStackIndex.remove(entry.hash); movieStackIndex.remove(entry.hash);