From 4e73035aeff0d049d0880efbd92a08886f2cebb1 Mon Sep 17 00:00:00 2001 From: theli Date: Thu, 24 Nov 2005 21:47:16 +0000 Subject: [PATCH] *) Bugfix for "too many open files" during index distribution git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1128 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/plasma/plasmaWordIndexDistribution.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/de/anomic/plasma/plasmaWordIndexDistribution.java b/source/de/anomic/plasma/plasmaWordIndexDistribution.java index c2a5242f8..18fb82ad0 100644 --- a/source/de/anomic/plasma/plasmaWordIndexDistribution.java +++ b/source/de/anomic/plasma/plasmaWordIndexDistribution.java @@ -276,6 +276,11 @@ public final class plasmaWordIndexDistribution { return indexCount; } else { log.logSevere("Index distribution failed. Too few peers (" + hc + ") received the index, not deleted locally."); + // simply close the indexEntities + for (int i = 0; i < indexEntities.length; i++) try { + indexEntities[i].close(); + } catch (IOException ee) {} + return -1; } }