2007-03-12 jrandom

* dodge a race on startup (thanks zzz!)
This commit is contained in:
jrandom
2007-03-12 18:19:57 +00:00
committed by zzz
parent d6c8a4d9eb
commit ae402baa71
3 changed files with 10 additions and 4 deletions

View File

@ -1,4 +1,7 @@
$Id: history.txt,v 1.557 2007-03-08 13:55:18 zzz Exp $
$Id: history.txt,v 1.558 2007-03-10 03:45:28 zzz Exp $
2007-03-12 jrandom
* dodge a race on startup (thanks zzz!)
2007-03-10 zzz
* Streaming lib: Change initial RTT deviation from RTT to RTT/2

View File

@ -225,7 +225,10 @@ public class Router {
public long getWhenStarted() { return _started; }
/** wall clock uptime */
public long getUptime() { return _context.clock().now() - _context.clock().getOffset() - _started; }
public long getUptime() {
if ( (_context == null) || (_context.clock() == null) ) return 1; // racing on startup
return _context.clock().now() - _context.clock().getOffset() - _started;
}
public RouterContext getContext() { return _context; }

View File

@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
*
*/
public class RouterVersion {
public final static String ID = "$Revision: 1.493 $ $Date: 2007-03-08 13:55:17 $";
public final static String ID = "$Revision: 1.494 $ $Date: 2007-03-10 03:45:27 $";
public final static String VERSION = "0.6.1.27";
public final static long BUILD = 7;
public final static long BUILD = 8;
public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
System.out.println("Router ID: " + RouterVersion.ID);