diff --git a/build.properties b/build.properties index 7fb72d4ad..d778b47b1 100644 --- a/build.properties +++ b/build.properties @@ -3,7 +3,7 @@ javacSource=1.4 javacTarget=1.4 # Release Configuration -releaseVersion=0.515 +releaseVersion=0.516 releaseFile=yacy_dev_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz #releaseFile=yacy_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz releaseDir=yacy_dev_v${releaseVersion}_${DSTAMP}_${releaseNr} diff --git a/htroot/Status.java b/htroot/Status.java index 62b77674a..d26e453ae 100644 --- a/htroot/Status.java +++ b/htroot/Status.java @@ -179,7 +179,7 @@ public class Status { } else { prop.put("extPortFormat",0); } - prop.put("host", serverCore.publicLocalIP()); + prop.put("host", serverCore.publicLocalIP().getHostAddress()); // ssl support prop.put("sslSupport",env.getConfig("keyStore", "").length() == 0 ? 0:1); diff --git a/htroot/env/base.css b/htroot/env/base.css index 9bf916b72..28bd2096d 100644 --- a/htroot/env/base.css +++ b/htroot/env/base.css @@ -235,7 +235,7 @@ div.ProgressBarCaption { } div.ProgressBar { float:left; - width:150px; + width:120px; height:10px; } div.ProgressBarFill { diff --git a/source/de/anomic/http/httpc.java b/source/de/anomic/http/httpc.java index 3bb1ffb6e..f509e557d 100644 --- a/source/de/anomic/http/httpc.java +++ b/source/de/anomic/http/httpc.java @@ -535,17 +535,11 @@ public final class httpc { */ public static void flushHitNameCache() { int cutofftime = intTime(System.currentTimeMillis()) - maxNameCacheHitAge; - int size; String k; - synchronized (nameCacheHit) { - size = nameCacheHitAges.size(); - while ((size > 0) && - (size > maxNameCacheHitSize) || (nameCacheHitAges.getMinScore() < cutofftime)) { - k = (String) nameCacheHitAges.getMinObject(); - nameCacheHit.remove(k); - nameCacheHitAges.deleteScore(k); - size--; // size = nameCacheAges.size(); - } + while ((nameCacheHitAges.size() > maxNameCacheHitSize) || (nameCacheHitAges.getMinScore() < cutofftime)) { + k = (String) nameCacheHitAges.getMinObject(); + if (nameCacheHit.remove(k) == null) break; // ensure termination + nameCacheHitAges.deleteScore(k); } } @@ -555,17 +549,11 @@ public final class httpc { */ public static void flushMissNameCache() { int cutofftime = intTime(System.currentTimeMillis()) - maxNameCacheMissAge; - int size; String k; - synchronized (nameCacheMiss) { - size = nameCacheMissAges.size(); - while ((size > 0) && - (size > maxNameCacheMissSize) || (nameCacheMissAges.getMinScore() < cutofftime)) { - k = (String) nameCacheMissAges.getMinObject(); - nameCacheMiss.remove(k); - nameCacheMissAges.deleteScore(k); - size--; // size = nameCacheAges.size(); - } + while ((nameCacheMissAges.size() > maxNameCacheMissSize) || (nameCacheMissAges.getMinScore() < cutofftime)) { + k = (String) nameCacheMissAges.getMinObject(); + if (!nameCacheMiss.remove(k)) break; // ensure termination + nameCacheMissAges.deleteScore(k); } } diff --git a/source/de/anomic/yacy/yacyDHTAction.java b/source/de/anomic/yacy/yacyDHTAction.java index 5c6bbab5f..bf1215d80 100644 --- a/source/de/anomic/yacy/yacyDHTAction.java +++ b/source/de/anomic/yacy/yacyDHTAction.java @@ -296,9 +296,10 @@ public class yacyDHTAction implements yacyPeerAction { double avdist, firstdist, lastdist; Enumeration e = this.getAcceptRemoteIndexSeeds(lastKey); - Hashtable peerFilter = new Hashtable(); + Hashtable peerFilter = new Hashtable(); + int maxloop = Math.min(30, yacyCore.seedDB.sizeConnected()); // to ensure termination if (log != null) log.logInfo("Collecting DHT target peers for first_hash = " + firstKey + ", last_hash = " + lastKey); - while ((e.hasMoreElements()) && (seeds.size() < (primaryPeerCount + reservePeerCount))) { + while ((e.hasMoreElements()) && (seeds.size() < (primaryPeerCount + reservePeerCount)) && (maxloop-- > 0)) { seed = (yacySeed) e.nextElement(); if (seeds != null) { firstdist = yacyDHTAction.dhtDistance(seed.hash, firstKey);