diff --git a/source/de/anomic/http/httpc.java b/source/de/anomic/http/httpc.java index ebce82a31..819132365 100644 --- a/source/de/anomic/http/httpc.java +++ b/source/de/anomic/http/httpc.java @@ -210,7 +210,12 @@ public final class httpc { } // initialize it - newHttpc.init(server,port,timeout,ssl,remoteProxyHost, remoteProxyPort); + try { + newHttpc.init(server,port,timeout,ssl,remoteProxyHost, remoteProxyPort); + } catch (IOException e) { + try{ httpc.theHttpcPool.returnObject(newHttpc); } catch (Exception e1) {} + throw e; + } return newHttpc; } diff --git a/source/de/anomic/plasma/plasmaCrawlWorker.java b/source/de/anomic/plasma/plasmaCrawlWorker.java index 9e78ae945..3b66e38dd 100644 --- a/source/de/anomic/plasma/plasmaCrawlWorker.java +++ b/source/de/anomic/plasma/plasmaCrawlWorker.java @@ -414,6 +414,8 @@ public final class plasmaCrawlWorker extends Thread { log.logWarning("Read timeout while receiving content from '" + url.toString() + "'. Retrying request."); retryCrawling = true; + } else if (errorMsg.indexOf("Connection refused") >= 0) { + log.logError("CRAWLER LOADER ERROR2 with URL=" + url.toString() + ": Connection refused"); } if (retryCrawling) { diff --git a/source/de/anomic/server/serverCore.java b/source/de/anomic/server/serverCore.java index e189f932b..49ceb1d05 100644 --- a/source/de/anomic/server/serverCore.java +++ b/source/de/anomic/server/serverCore.java @@ -518,7 +518,10 @@ public final class serverCore extends serverAbstractThread implements serverThre // trying to gracefull stop all still running sessions ... serverCore.this.log.logInfo("Signaling shutdown to " + threadCount + " remaining session threads ..."); for ( int currentThreadIdx = 0; currentThreadIdx < threadCount; currentThreadIdx++ ) { - ((Session)threadList[currentThreadIdx]).setStopped(true); + Thread currentThread = threadList[currentThreadIdx]; + if (currentThread.isAlive()) { + ((Session)currentThread).setStopped(true); + } } // waiting a frew ms for the session objects to continue processing