*) Bugfix for code cleanup

- Code must be in finally block, otherwise it does not work if an error occurs!

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1193 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 20 years ago
parent 356231b033
commit 386d9e45d8

@ -1129,6 +1129,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
} }
private void processResourceStack(plasmaSwitchboardQueue.Entry entry) { private void processResourceStack(plasmaSwitchboardQueue.Entry entry) {
try {
// work off one stack entry with a fresh resource // work off one stack entry with a fresh resource
long stackStartTime = 0, stackEndTime = 0, long stackStartTime = 0, stackEndTime = 0,
parsingStartTime = 0, parsingEndTime = 0, parsingStartTime = 0, parsingEndTime = 0,
@ -1370,8 +1371,10 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
yacyClient.crawlReceipt(initiator, "crawl", "rejected", noIndexReason, null, ""); yacyClient.crawlReceipt(initiator, "crawl", "rejected", noIndexReason, null, "");
} }
} }
document = null; document = null;
} finally {
// The following code must be into the finally block, otherwise it will not be executed
// on errors!
// removing current entry from in process list // removing current entry from in process list
synchronized (this.indexingTasksInProcess) { synchronized (this.indexingTasksInProcess) {
@ -1391,6 +1394,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
} }
entry = null; entry = null;
} }
}
private void generateCitationReference(String baseurlhash, Date docDate, plasmaParserDocument document, plasmaCondenser condenser) { private void generateCitationReference(String baseurlhash, Date docDate, plasmaParserDocument document, plasmaCondenser condenser) {
// generate citation reference // generate citation reference

Loading…
Cancel
Save