Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

*) Bugfix for "too many open files" during index distribution

theli4e73035aeff0
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;
}
}