forked from I2P_Developers/i2p.i2p
Tunnels: Reduce build reply timeout
This commit is contained in:
@ -1,3 +1,7 @@
|
||||
2022-03-12 zzz
|
||||
* SSU2: Fixes
|
||||
* Tunnels: Reduce build reply timeout
|
||||
|
||||
2022-03-11 zzz
|
||||
* i2psnark standalone: Add DTG
|
||||
|
||||
|
@ -18,7 +18,7 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Git";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 6;
|
||||
public final static long BUILD = 7;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
|
@ -20,6 +20,7 @@ import net.i2p.stat.Rate;
|
||||
import net.i2p.stat.RateStat;
|
||||
import net.i2p.stat.StatManager;
|
||||
import net.i2p.util.Log;
|
||||
import net.i2p.util.SystemVersion;
|
||||
|
||||
/**
|
||||
* Single threaded controller of the tunnel creation process, spanning all tunnel pools.
|
||||
@ -307,7 +308,7 @@ class BuildExecutor implements Runnable {
|
||||
*/
|
||||
|
||||
/** Set 1.5 * LOOP_TIME < BuildRequestor.REQUEST_TIMEOUT/4 - margin */
|
||||
private static final int LOOP_TIME = 1000;
|
||||
private static final int LOOP_TIME = SystemVersion.isSlow() ? 1000 : 800;
|
||||
|
||||
public void run() {
|
||||
_isRunning = true;
|
||||
|
@ -32,6 +32,7 @@ import net.i2p.router.tunnel.HopConfig;
|
||||
import net.i2p.router.tunnel.TunnelCreatorConfig;
|
||||
import static net.i2p.router.tunnel.pool.BuildExecutor.Result.*;
|
||||
import net.i2p.util.Log;
|
||||
import net.i2p.util.SystemVersion;
|
||||
import net.i2p.util.VersionComparator;
|
||||
|
||||
/**
|
||||
@ -69,7 +70,7 @@ abstract class BuildRequestor {
|
||||
* so can we use a successfully built tunnel anyway.
|
||||
*
|
||||
*/
|
||||
static final int REQUEST_TIMEOUT = 13*1000;
|
||||
static final int REQUEST_TIMEOUT = SystemVersion.isSlow() ? 10*1000 : 5*1000;
|
||||
|
||||
/** make this shorter than REQUEST_TIMEOUT */
|
||||
private static final int FIRST_HOP_TIMEOUT = 10*1000;
|
||||
|
Reference in New Issue
Block a user