diff --git a/source/de/anomic/plasma/plasmaCrawlStacker.java b/source/de/anomic/plasma/plasmaCrawlStacker.java index e71ed04b1..c6bc55133 100644 --- a/source/de/anomic/plasma/plasmaCrawlStacker.java +++ b/source/de/anomic/plasma/plasmaCrawlStacker.java @@ -88,6 +88,23 @@ public final class plasmaCrawlStacker { } + public void close() { + try { + this.log.logFine("Shutdown. Terminationg worker threads."); + if (this.theWorkerPool != null) this.theWorkerPool.close(); + } catch (Exception e1) { + this.log.logSevere("Unable to shutdown all remaining stackCrawl threads", e1); + } + + try { + this.log.logFine("Shutdown. Closing stackCrawl queue."); + if (this.queue != null) this.queue.close(); + this.queue = null; + } catch (IOException e) { + this.log.logSevere("DB could not be closed properly.", e); + } + } + public int size() { return this.queue.size(); } diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.java index 58a79cf53..7deb49303 100644 --- a/source/de/anomic/plasma/plasmaSwitchboard.java +++ b/source/de/anomic/plasma/plasmaSwitchboard.java @@ -630,9 +630,10 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser indexDistribution.close(); cacheLoader.close(); wikiDB.close(); - userDB.close(); + userDB.close(); messageDB.close(); if (facilityDB != null) facilityDB.close(); + sbStackCrawlThread.close(); urlPool.close(); profiles.close(); robots.close();