summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororbiter <orbiter@6c8d7289-2bf4-0310-a012-ef5d649a1542>2009-05-11 22:26:21 +0000
committerorbiter <orbiter@6c8d7289-2bf4-0310-a012-ef5d649a1542>2009-05-11 22:26:21 +0000
commitc01d6f43e1d358ce3841fbd05403f4d193ceb602 (patch)
tree13624b95b38ee28111fd4bb2e438f588082615d9
parenta49edd9415ec76a44699bd824bb9705abf1d3f27 (diff)
- fixed problem with thread dump if no arguments are given
- rejecting peers that are older than 6 hours (not-seen during 6 hours) - 0.78, targeting 0.8 at the end of the week git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5948 6c8d7289-2bf4-0310-a012-ef5d649a1542
-rw-r--r--build.properties2
-rw-r--r--htroot/Network.java5
-rw-r--r--htroot/Threaddump_p.java4
-rw-r--r--htroot/env/templates/submenuViewLog.template2
-rw-r--r--source/de/anomic/yacy/yacyPeerActions.java2
5 files changed, 9 insertions, 6 deletions
diff --git a/build.properties b/build.properties
index 2ea47c48d..55b41da10 100644
--- a/build.properties
+++ b/build.properties
@@ -3,7 +3,7 @@ javacSource=1.5
javacTarget=1.5
# Release Configuration
-releaseVersion=0.77
+releaseVersion=0.78
stdReleaseFile=yacy_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
embReleaseFile=yacy_emb_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
proReleaseFile=yacy_pro_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
diff --git a/htroot/Network.java b/htroot/Network.java
index 62a8c08f7..d8dde98d7 100644
--- a/htroot/Network.java
+++ b/htroot/Network.java
@@ -381,7 +381,10 @@ public class Network {
prop.putHTML(STR_TABLE_LIST + conCount + "_type_url", seed.get(yacySeed.SEEDLIST, "http://nowhere/"));
final long lastseen = Math.abs((System.currentTimeMillis() - seed.getLastSeenUTC()) / 1000 / 60);
- if (page == 2 || lastseen > 1440) { // Passive Peers should be passive, also Peers without contact greater than an day
+ if (page == 1 && lastseen > 720) {
+ continue;
+ }
+ if (page == 2 || (page == 1 && lastseen > 360)) { // Passive Peers should be passive, also Peers without contact greater than 6 hours
// principal/senior/junior: red/red=offline
prop.put(STR_TABLE_LIST + conCount + "_type_direct", 2);
} else {
diff --git a/htroot/Threaddump_p.java b/htroot/Threaddump_p.java
index eb7fcb067..4ecbfab6c 100644
--- a/htroot/Threaddump_p.java
+++ b/htroot/Threaddump_p.java
@@ -56,8 +56,8 @@ public class Threaddump_p {
final StringBuilder buffer = new StringBuilder(1000);
- final boolean plain = post.get("plain", "false").equals("true");
- final int sleep = post.getInt("sleep", 0); // a sleep before creation of a thread dump can be used for profiling
+ final boolean plain = post != null && post.get("plain", "false").equals("true");
+ final int sleep = (post == null) ? 0 : post.getInt("sleep", 0); // a sleep before creation of a thread dump can be used for profiling
if (sleep > 0) try {Thread.sleep(sleep);} catch (final InterruptedException e) {}
prop.put("dump", "1");
// Thread dump
diff --git a/htroot/env/templates/submenuViewLog.template b/htroot/env/templates/submenuViewLog.template
index c68063d2c..5daf079c9 100644
--- a/htroot/env/templates/submenuViewLog.template
+++ b/htroot/env/templates/submenuViewLog.template
@@ -3,6 +3,6 @@
<ul class="SubMenu">
<li><a href="/ViewLog_p.html" class="MenuItemLink lock">Server Log</a></li>
<li><a href="/LogStatistics_p.html" class="MenuItemLink lock">Log Statistics</a></li>
- <li><a href="/Threaddump_p.html?createThreaddump=" class="MenuItemLink lock">Thread Dump</a></li>
+ <li><a href="/Threaddump_p.html" class="MenuItemLink lock">Thread Dump</a></li>
</ul>
</div> \ No newline at end of file
diff --git a/source/de/anomic/yacy/yacyPeerActions.java b/source/de/anomic/yacy/yacyPeerActions.java
index 1f8839fde..40f78a8b3 100644
--- a/source/de/anomic/yacy/yacyPeerActions.java
+++ b/source/de/anomic/yacy/yacyPeerActions.java
@@ -105,7 +105,7 @@ public class yacyPeerActions {
ctimeUTC0 = nowUTC0Time;
assert (seed.getLastSeenUTC() - ctimeUTC0 < 100);
}
- if (Math.abs(nowUTC0Time - ctimeUTC0) > 60 * 60 * 12 * 1000) {
+ if (Math.abs(nowUTC0Time - ctimeUTC0) / 1000 / 60 > 60 * 6 ) {
// the new connection is out-of-age, we reject the connection
if (yacyCore.log.isFine()) yacyCore.log.logFine("connect: rejecting out-dated peer '" + seed.getName() + "' from " + seed.getPublicAddress() + "; nowUTC0=" + nowUTC0Time + ", seedUTC0=" + ctimeUTC0 + ", TimeDiff=" + DateFormatter.formatInterval(Math.abs(nowUTC0Time - ctimeUTC0)));
return false;