*) Trying to solve pool not open problem

See: http://www.yacy-forum.de/viewtopic.php?t=1798

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1482 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 19 years ago
parent a6245a302f
commit ab7a911bb3

@ -152,21 +152,28 @@ public final class plasmaCrawlStacker {
public void job() {
try {
// getting a new message from the crawler queue
if (Thread.currentThread().isInterrupted()) return;
stackCrawlMessage theMsg = this.queue.waitForMessage();
// getting a free session thread from the pool
if (Thread.currentThread().isInterrupted()) return;
Worker worker = (Worker) this.theWorkerPool.borrowObject();
// processing the new request
worker.execute(theMsg);
} catch (InterruptedException e) {
Thread.interrupted();
//this.stopped = true;
}
catch (Exception e) {
} catch (Exception e) {
if (e instanceof InterruptedException) {
this.log.logFine("Interruption detected.");
} else if ((e instanceof IllegalStateException) &&
(e.getMessage() != null) &&
(e.getMessage().indexOf("Pool not open") >= -1)) {
this.log.logFine("Pool was closed.");
} else {
this.log.logSevere("plasmaStackCrawlThread.run/loop", e);
}
}
}
public void enqueue(
String nexturlString,

Loading…
Cancel
Save