From ee32b079955349ee3443f4259d14342bcd6ef8b0 Mon Sep 17 00:00:00 2001
From: jrandom <jrandom>
Date: Sun, 19 Dec 2004 18:55:09 +0000
Subject: [PATCH] 2004-12-19  jrandom     * Fix for a race on startup wrt the
 new stats (thanks susi!)

---
 history.txt                                                  | 5 ++++-
 router/java/src/net/i2p/router/RouterVersion.java            | 4 ++--
 .../src/net/i2p/router/transport/CommSystemFacadeImpl.java   | 2 +-
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/history.txt b/history.txt
index fc9352606f..d113e6feef 100644
--- a/history.txt
+++ b/history.txt
@@ -1,4 +1,7 @@
-$Id: history.txt,v 1.113 2004/12/19 06:04:57 jrandom Exp $
+$Id: history.txt,v 1.114 2004/12/19 11:27:10 jrandom Exp $
+
+2004-12-19  jrandom
+    * Fix for a race on startup wrt the new stats (thanks susi!)
 
 2004-12-19  jrandom
     * Added three new stats - router.activePeers, router.fastPeers, and 
diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java
index 3ac7f8234b..2ca5bd2535 100644
--- a/router/java/src/net/i2p/router/RouterVersion.java
+++ b/router/java/src/net/i2p/router/RouterVersion.java
@@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
  *
  */
 public class RouterVersion {
-    public final static String ID = "$Revision: 1.118 $ $Date: 2004/12/19 06:04:57 $";
+    public final static String ID = "$Revision: 1.119 $ $Date: 2004/12/19 11:27:10 $";
     public final static String VERSION = "0.4.2.4";
-    public final static long BUILD = 3;
+    public final static long BUILD = 4;
     public static void main(String args[]) {
         System.out.println("I2P Router version: " + VERSION);
         System.out.println("Router ID: " + RouterVersion.ID);
diff --git a/router/java/src/net/i2p/router/transport/CommSystemFacadeImpl.java b/router/java/src/net/i2p/router/transport/CommSystemFacadeImpl.java
index b328689c61..4b03fd4c23 100644
--- a/router/java/src/net/i2p/router/transport/CommSystemFacadeImpl.java
+++ b/router/java/src/net/i2p/router/transport/CommSystemFacadeImpl.java
@@ -51,7 +51,7 @@ public class CommSystemFacadeImpl extends CommSystemFacade {
             _manager.restart();
     }
     
-    public int countActivePeers() { return _manager.countActivePeers(); }
+    public int countActivePeers() { return (_manager == null ? 0 : _manager.countActivePeers()); }
     
     public List getBids(OutNetMessage msg) {
         return _manager.getBids(msg);
-- 
GitLab