Skip to content

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

*) Trying to solve "java.net.BindException: Address already in use: JVM_Bind" Problem by retrying Socket bind See: http://www.yacy-forum.de/viewtopic.php?p=6935

theli86305f051d36
diff --git a/source/de/anomic/plasma/plasmaCrawlWorker.java b/source/de/anomic/plasma/plasmaCrawlWorker.java
index 110d60465..9e78ae945 100644
--- a/source/de/anomic/plasma/plasmaCrawlWorker.java
+++ b/source/de/anomic/plasma/plasmaCrawlWorker.java
@@ -402,7 +402,11 @@ public final class plasmaCrawlWorker extends Thread {
boolean retryCrawling = false;
String errorMsg = e.getMessage();
if (errorMsg != null) {
- if (errorMsg.indexOf("Corrupt GZIP trailer") >= 0) {
+ if (e instanceof java.net.BindException) {
+ log.logWarning("BindException detected while trying to download content from '" + url.toString() +
+ "'. Retrying request.");
+ retryCrawling = true;
+ } else if (errorMsg.indexOf("Corrupt GZIP trailer") >= 0) {
log.logWarning("Problems detected while receiving gzip encoded content from '" + url.toString() +
"'. Retrying request without using gzip content encoding.");
retryCrawling = true;