Author: toad
Date: 2007-06-09 21:38:28 +0000 (Sat, 09 Jun 2007)
New Revision: 13508
Modified:
trunk/freenet/src/freenet/node/NodeStats.java
Log:
Fix pInstantReject
Modified: trunk/freenet/src/freenet/node/NodeStats.java
===================================================================
--- trunk/freenet/src/freenet/node/NodeStats.java 2007-06-09 21:33:19 UTC
(rev 13507)
+++ trunk/freenet/src/freenet/node/NodeStats.java 2007-06-09 21:38:28 UTC
(rev 13508)
@@ -418,6 +418,7 @@
node.getOutputBandwidthLimit() * 90; // 90 seconds at
full power; we have to leave some time for the search as well
bandwidthAvailableOutput *=
NodeStats.FRACTION_OF_BANDWIDTH_USED_BY_REQUESTS;
if(bandwidthLiabilityOutput > bandwidthAvailableOutput) {
+ pInstantRejectIncoming.report(1.0);
preemptiveRejectReasons.inc("Output bandwidth
liability");
return "Output bandwidth liability";
}
@@ -431,6 +432,7 @@
double bandwidthAvailableInput =
node.getInputBandwidthLimit() * 90; // 90 seconds at
full power
if(bandwidthLiabilityInput > bandwidthAvailableInput) {
+ pInstantRejectIncoming.report(1.0);
preemptiveRejectReasons.inc("Input bandwidth
liability");
return "Input bandwidth liability";
}