* NetDB: Fix RI publish interval, broken in -7

This commit is contained in:
zzz
2013-11-07 12:31:46 +00:00
parent c810694e07
commit 5a34e1de4f
3 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2013-11-07 zzz
* i2psnark: Fix file links, broken in -12 (ticket #1114)
* Logging: Track duplicates across flush interval (ticket #1110)
* NetDB: Fix RI publish interval, broken in -7
2013-11-03 zzz 2013-11-03 zzz
* NetDB: Allow store of leaseset as long as one lease has not expired * NetDB: Allow store of leaseset as long as one lease has not expired
* Transport: * Transport:

View File

@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */ /** deprecated */
public final static String ID = "Monotone"; public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION; public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 21; public final static long BUILD = 22;
/** for example "-test" */ /** for example "-test" */
public final static String EXTRA = ""; public final static String EXTRA = "";

View File

@ -60,7 +60,7 @@ public class PublishLocalRouterInfoJob extends JobImpl {
long now = getContext().clock().now(); long now = getContext().clock().now();
if (last + MIN_PUBLISH_DELAY > now) { if (last + MIN_PUBLISH_DELAY > now) {
long delay = getDelay(); long delay = getDelay();
requeue(last + delay); requeue(last + delay - now);
return; return;
} }
RouterInfo ri = new RouterInfo(getContext().router().getRouterInfo()); RouterInfo ri = new RouterInfo(getContext().router().getRouterInfo());
@ -107,6 +107,6 @@ public class PublishLocalRouterInfoJob extends JobImpl {
} }
private long getDelay() { private long getDelay() {
return (PUBLISH_DELAY * 3 / 4) + getContext().random().nextInt((int)PUBLISH_DELAY / 4); return (PUBLISH_DELAY * 3 / 4) + getContext().random().nextLong(PUBLISH_DELAY / 4);
} }
} }