Author: toad
Date: 2007-12-08 13:25:47 +0000 (Sat, 08 Dec 2007)
New Revision: 16400
Modified:
trunk/freenet/src/freenet/node/LocationManager.java
Log:
Delay startup of swapping by 1 minute.
Modified: trunk/freenet/src/freenet/node/LocationManager.java
===================================================================
--- trunk/freenet/src/freenet/node/LocationManager.java 2007-12-08 13:03:56 UTC
(rev 16399)
+++ trunk/freenet/src/freenet/node/LocationManager.java 2007-12-08 13:25:47 UTC
(rev 16400)
@@ -62,6 +62,8 @@
static final int MIN_SWAP_TIME =
Node.MIN_INTERVAL_BETWEEN_INCOMING_SWAP_REQUESTS;
/** Maximum swap delay */
static final int MAX_SWAP_TIME = 60*1000;
+ /** Don't start swapping until our peers have had a reasonable chance to
reconnect. */
+ private static final long STARTUP_DELAY = 60*1000;
private static boolean logMINOR;
final RandomSource r;
final SwapRequestSender sender;
@@ -134,7 +136,7 @@
* we are not locked.
*/
public void startSender() {
- node.executor.execute(sender, "SwapRequest sender");
+ node.getTicker().queueTimedJob(sender, STARTUP_DELAY);
}
/**