cleanup connectPeer & yacyVersion.latestRelease usage

obsolete since 
527b3decde
pull/51/head
reger 9 years ago
parent 7097dcbdbd
commit 5f113be760

@ -109,14 +109,7 @@ public class PeerActions {
return false; return false;
} }
// disconnection time
long dtimeUTC0;
final Seed disconnectedSeed = this.seedDB.getDisconnected(seed.hash); final Seed disconnectedSeed = this.seedDB.getDisconnected(seed.hash);
if (disconnectedSeed == null) {
dtimeUTC0 = 0; // never disconnected: virtually disconnected maximum time ago
} else {
dtimeUTC0 = disconnectedSeed.getLong("dct", 0);
}
if (direct) { if (direct) {
// remember the moment // remember the moment
@ -130,9 +123,6 @@ public class PeerActions {
if (Math.abs(nowUTC0Time - ctimeUTC0) > 120000) seed.setFlagDirectConnect(false); // 2 minutes if (Math.abs(nowUTC0Time - ctimeUTC0) > 120000) seed.setFlagDirectConnect(false); // 2 minutes
} }
// update latest version number
if (seed.getVersion() > yacyVersion.latestRelease) yacyVersion.latestRelease = seed.getVersion();
// prepare to update // prepare to update
if (disconnectedSeed != null) { if (disconnectedSeed != null) {
// if the indirect connect aims to announce a peer that we know // if the indirect connect aims to announce a peer that we know

@ -14,11 +14,6 @@ public class yacyVersion implements Comparator<yacyVersion>, Comparable<yacyVers
public static final double YACY_POVIDES_REMOTECRAWL_LISTS = (float) 0.550; public static final double YACY_POVIDES_REMOTECRAWL_LISTS = (float) 0.550;
private static yacyVersion thisVersion = null; private static yacyVersion thisVersion = null;
/**
* information about latest release, retrieved by other peers release version,
* this value is overwritten when a peer with later version appears*/
public static double latestRelease = 0.1; //
private double releaseNr; private double releaseNr;
private final String dateStamp; private final String dateStamp;
private int svn; private int svn;

Loading…
Cancel
Save