forked from I2P_Developers/i2p.i2p
* NetDB: Fix RI publish interval, broken in -7
This commit is contained in:
@ -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
|
||||
* NetDB: Allow store of leaseset as long as one lease has not expired
|
||||
* Transport:
|
||||
|
@ -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 = 21;
|
||||
public final static long BUILD = 22;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
|
@ -60,7 +60,7 @@ public class PublishLocalRouterInfoJob extends JobImpl {
|
||||
long now = getContext().clock().now();
|
||||
if (last + MIN_PUBLISH_DELAY > now) {
|
||||
long delay = getDelay();
|
||||
requeue(last + delay);
|
||||
requeue(last + delay - now);
|
||||
return;
|
||||
}
|
||||
RouterInfo ri = new RouterInfo(getContext().router().getRouterInfo());
|
||||
@ -107,6 +107,6 @@ public class PublishLocalRouterInfoJob extends JobImpl {
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user