Author: nextgens
Date: 2007-03-21 22:01:28 +0000 (Wed, 21 Mar 2007)
New Revision: 12256

Modified:
   trunk/freenet/src/freenet/node/Node.java
Log:
Fix a stupid bug I've introduced preventing requests from beeing started.

Modified: trunk/freenet/src/freenet/node/Node.java
===================================================================
--- trunk/freenet/src/freenet/node/Node.java    2007-03-21 21:41:55 UTC (rev 
12255)
+++ trunk/freenet/src/freenet/node/Node.java    2007-03-21 22:01:28 UTC (rev 
12256)
@@ -1836,7 +1836,7 @@
        public String shouldRejectRequest(boolean canAcceptAnyway, boolean 
isInsert, boolean isSSK) {
                if(logMINOR) dumpByteCostAverages();

-               if(threadLimit > getActiveThreadCount())
+               if(threadLimit < getActiveThreadCount())
                        return "Accepting the request would mean going above 
the maximum number of allowed threads";

                double bwlimitDelayTime = 
throttledPacketSendAverage.currentValue();
@@ -2240,7 +2240,6 @@
                long usedJavaMem = (long)(totalMemory - freeMemory);
                long allocatedJavaMem = (long)totalMemory;
                long maxJavaMem = (long)maxMemory;
-               int threadCount = Thread.activeCount();
                int availableCpus = rt.availableProcessors();

                fs.put("freeJavaMemory", (long)freeMemory);
@@ -2248,7 +2247,7 @@
                fs.put("allocatedJavaMemory", allocatedJavaMem);
                fs.put("maximumJavaMemory", maxJavaMem);
                fs.put("availableCPUs", availableCpus);
-               fs.put("runningThreadCount", threadCount);
+               fs.put("runningThreadCount", getActiveThreadCount());

                return fs;
        }


Reply via email to