From 670b4033cbb74c71100f61801ef6030998019cb3 Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Sat, 16 Jan 2010 17:06:20 +0000 Subject: [PATCH] Add a small number of ms (0-300) that increases as we approach the expire time. Since the earliest date functions as a version number, this will force the floodfill to flood each new version; otherwise it won't if the earliest time hasn't changed. --- .../src/net/i2p/router/client/RequestLeaseSetJob.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/router/java/src/net/i2p/router/client/RequestLeaseSetJob.java b/router/java/src/net/i2p/router/client/RequestLeaseSetJob.java index c4e8e8d1b1..51d3a304c9 100644 --- a/router/java/src/net/i2p/router/client/RequestLeaseSetJob.java +++ b/router/java/src/net/i2p/router/client/RequestLeaseSetJob.java @@ -54,7 +54,14 @@ class RequestLeaseSetJob extends JobImpl { if (_runner.isDead()) return; RequestLeaseSetMessage msg = new RequestLeaseSetMessage(); - Date end = new Date(_requestState.getRequested().getEarliestLeaseDate()); + long endTime = _requestState.getRequested().getEarliestLeaseDate(); + // Add a small number of ms (0-300) that increases as we approach the expire time. + // Since the earliest date functions as a version number, + // this will force the floodfill to flood each new version; + // otherwise it won't if the earliest time hasn't changed. + long fudge = 300 - ((endTime - getContext().clock().now()) / 2000); + endTime += fudge; + Date end = new Date(endTime); msg.setEndDate(end); msg.setSessionId(_runner.getSessionId()); -- GitLab