Author: toad
Date: 2007-12-15 15:44:48 +0000 (Sat, 15 Dec 2007)
New Revision: 16573

Modified:
   trunk/freenet/src/freenet/node/IPDetectorPluginManager.java
Log:
No { opennet peers + darknet peers } = no peers. Even if we have some seednodes.

Modified: trunk/freenet/src/freenet/node/IPDetectorPluginManager.java
===================================================================
--- trunk/freenet/src/freenet/node/IPDetectorPluginManager.java 2007-12-15 
15:17:30 UTC (rev 16572)
+++ trunk/freenet/src/freenet/node/IPDetectorPluginManager.java 2007-12-15 
15:44:48 UTC (rev 16573)
@@ -243,6 +243,7 @@
                if(logMINOR) Logger.minor(this, "Maybe running IP detection 
plugins", new Exception("debug"));
                PeerNode[] peers = node.getPeerNodes();
                PeerNode[] conns = node.getConnectedPeers();
+               int peerCount = node.peers.getOpennetPeers().length + 
node.peers.getDarknetPeers().length;
                FreenetInetAddress[] nodeAddrs = detector.getPrimaryIPAddress();
                long now = System.currentTimeMillis();
                synchronized(this) {
@@ -272,7 +273,7 @@

                        }

-                       if(peers.length == 0) {
+                       if(peerCount == 0) {

                                if(shouldDetectNoPeers(now)) startDetect();



Reply via email to