Author: toad
Date: 2007-10-24 16:11:01 +0000 (Wed, 24 Oct 2007)
New Revision: 15529
Modified:
trunk/freenet/src/freenet/node/FNPPacketMangler.java
Log:
Doh: actually set timeLastReset !
Modified: trunk/freenet/src/freenet/node/FNPPacketMangler.java
===================================================================
--- trunk/freenet/src/freenet/node/FNPPacketMangler.java 2007-10-24
16:08:49 UTC (rev 15528)
+++ trunk/freenet/src/freenet/node/FNPPacketMangler.java 2007-10-24
16:11:01 UTC (rev 15529)
@@ -2655,8 +2655,8 @@
*/
private boolean maybeResetTransientKey() {
synchronized (authenticatorCache) {
+ long now = System.currentTimeMillis();;
if(authenticatorCache.size() <
AUTHENTICATOR_CACHE_SIZE) {
- long now = System.currentTimeMillis();
if(now - timeLastReset <
TRANSIENT_KEY_REKEYING_MIN_INTERVAL)
return false;
}
@@ -2664,6 +2664,8 @@
// reset the authenticator cache
authenticatorCache.clear();
+
+ timeLastReset = now;
}
node.getTicker().queueTimedJob(transientKeyRekeyer,
TRANSIENT_KEY_REKEYING_MIN_INTERVAL);
Logger.normal(this, "JFK's TransientKey has been changed and
the message cache flushed.");