forked from I2P_Developers/i2p.i2p
propagate from branch 'i2p.i2p.zzz.test2' (head 9aee013cf961ba795a6b5333481634c52d43abc5)
to branch 'i2p.i2p' (head e439e67c49695a624fabdf6f3cd1a8f7a3fd7ea5)
This commit is contained in:
@ -18,7 +18,7 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Monotone";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 15;
|
||||
public final static long BUILD = 1;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
|
@ -70,7 +70,8 @@ public class Reseeder {
|
||||
"http://netdb.i2p2.no/" + "," +
|
||||
"http://reseed.info/" + "," +
|
||||
"http://reseed.pkol.de/" + "," +
|
||||
"http://uk.reseed.i2p2.no/" + "," +
|
||||
//Temp disabled (ticket #1276)
|
||||
//"http://uk.reseed.i2p2.no/" + "," +
|
||||
"http://i2p-netdb.innovatio.no/" + "," +
|
||||
"http://ieb9oopo.mooo.com";
|
||||
// Temp disabled since h2ik have been AWOL since 06-03-2013
|
||||
@ -87,7 +88,8 @@ public class Reseeder {
|
||||
"https://netdb.i2p2.no/" + "," +
|
||||
"https://reseed.info/" + "," +
|
||||
"https://reseed.pkol.de/" + "," +
|
||||
"https://uk.reseed.i2p2.no/" + "," +
|
||||
//Temp disabled (ticket #1276)
|
||||
//"https://uk.reseed.i2p2.no/" + "," +
|
||||
"https://i2p-netdb.innovatio.no/" + "," +
|
||||
"https://ieb9oopo.mooo.com";
|
||||
// Temp disabled since h2ik have been AWOL since 06-03-2013
|
||||
|
@ -119,7 +119,8 @@ class NTCPConnection {
|
||||
private long _lastReceiveTime;
|
||||
private long _lastRateUpdated;
|
||||
private final long _created;
|
||||
private long _nextMetaTime;
|
||||
// prevent sending meta before established
|
||||
private long _nextMetaTime = Long.MAX_VALUE;
|
||||
private int _consecutiveZeroReads;
|
||||
|
||||
private static final int BLOCK_SIZE = 16;
|
||||
|
@ -17,6 +17,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
import java.util.Vector;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
@ -3127,7 +3128,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
private class PeerTestEvent extends SimpleTimer2.TimedEvent {
|
||||
private boolean _alive;
|
||||
/** when did we last test our reachability */
|
||||
private long _lastTested;
|
||||
private final AtomicLong _lastTested = new AtomicLong();
|
||||
private boolean _forceRun;
|
||||
|
||||
PeerTestEvent() {
|
||||
@ -3136,7 +3137,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
|
||||
public synchronized void timeReached() {
|
||||
if (shouldTest()) {
|
||||
long sinceRun = _context.clock().now() - _lastTested;
|
||||
long sinceRun = _context.clock().now() - _lastTested.get();
|
||||
if ( (_forceRun && sinceRun >= MIN_TEST_FREQUENCY) || (sinceRun >= TEST_FREQUENCY) ) {
|
||||
locked_runTest();
|
||||
}
|
||||
@ -3153,7 +3154,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
if (_log.shouldLog(Log.INFO))
|
||||
_log.info("Running periodic test with bob = " + bob);
|
||||
_testManager.runTest(bob.getRemoteIPAddress(), bob.getRemotePort(), bob.getCurrentCipherKey(), bob.getCurrentMACKey());
|
||||
_lastTested = _context.clock().now();
|
||||
setLastTested();
|
||||
_forceRun = false;
|
||||
return;
|
||||
}
|
||||
@ -3178,7 +3179,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
* @since 0.9.13
|
||||
*/
|
||||
public synchronized void forceRunImmediately() {
|
||||
_lastTested = 0;
|
||||
_lastTested.set(0);
|
||||
_forceRun = true;
|
||||
reschedule(5*1000);
|
||||
}
|
||||
@ -3197,8 +3198,9 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
* Set the last-tested timer to now
|
||||
* @since 0.9.13
|
||||
*/
|
||||
public synchronized void setLastTested() {
|
||||
_lastTested = _context.clock().now();
|
||||
public void setLastTested() {
|
||||
// do not synchronize - deadlock with PeerTestManager
|
||||
_lastTested.set(_context.clock().now());
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user