Update of /cvsroot/freenet/freenet/src/freenet/node
In directory sc8-pr-cvs1:/tmp/cvs-serv9222

Modified Files:
        Node.java 
Log Message:
Fix emergency bwlimiting so it only gets logged once per minute.

Index: Node.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/node/Node.java,v
retrieving revision 1.230
retrieving revision 1.231
diff -u -w -r1.230 -r1.231
--- Node.java   26 Oct 2003 07:31:24 -0000      1.230
+++ Node.java   26 Oct 2003 07:36:40 -0000      1.231
@@ -2456,10 +2456,10 @@
                                                Diagnostics.COUNT_CHANGE);
             int limit = (int)(outputBandwidthLimit /* * lowLevelBWLimitFudgeFactor*/ 
* 60);
             if(sent > (double)(outLimitConnectCutoff * limit)) {
-                if(lastLoggedRejectingConns < System.currentTimeMillis() + 60000) {
+                if(nextLoggedRejectingConns < System.currentTimeMillis()) {
                     Core.logger.log(this, "Rejecting connections because bwlimit 
exceeded by 200%!",
                                     Logger.NORMAL);
-                    lastLoggedRejectingConns = System.currentTimeMillis();
+                    nextLoggedRejectingConns = System.currentTimeMillis() + 60000;
                 }
                 return true; // Reject connections - emergency bwlimiting
             }
@@ -2479,7 +2479,7 @@
         return false;
     }
     
-    long lastLoggedRejectingConns = 0;
+    long nextLoggedRejectingConns = 0;
     
     /**
      * @return true if the Node is QueryRejecting inbound requests, false otherwise.

_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to