Author: robert
Date: 2008-01-17 17:21:01 +0000 (Thu, 17 Jan 2008)
New Revision: 17100
Modified:
trunk/freenet/src/freenet/node/Node.java
Log:
don't grab/wait for the whole-node lock for every packet
Modified: trunk/freenet/src/freenet/node/Node.java
===================================================================
--- trunk/freenet/src/freenet/node/Node.java 2008-01-17 17:02:47 UTC (rev
17099)
+++ trunk/freenet/src/freenet/node/Node.java 2008-01-17 17:21:01 UTC (rev
17100)
@@ -2461,7 +2461,11 @@
}
}
- public synchronized boolean isStopping() {
+ /**
+ * Returns true if the node is shutting down.
+ * The packet receiver calls this for every packet, and boolean is
atomic, so this method is not synchronized.
+ */
+ public boolean isStopping() {
return isStopping;
}
@@ -2979,6 +2983,10 @@
}
}
+ /**
+ * Returns true if the packet receiver should try to decode/process
packets that are not from a peer (i.e. from a seed connection)
+ * The packet receiver calls this upon receiving an unrecognized packet.
+ */
public boolean wantAnonAuth() {
return opennet != null && acceptSeedConnections;
}