Author: toad
Date: 2008-03-21 15:51:10 +0000 (Fri, 21 Mar 2008)
New Revision: 18674
Modified:
trunk/freenet/src/freenet/node/SendableGet.java
Log:
Detect when the key is still on the cooldown queue when we try to send it.
Modified: trunk/freenet/src/freenet/node/SendableGet.java
===================================================================
--- trunk/freenet/src/freenet/node/SendableGet.java 2008-03-21 14:58:34 UTC
(rev 18673)
+++ trunk/freenet/src/freenet/node/SendableGet.java 2008-03-21 15:51:10 UTC
(rev 18674)
@@ -55,6 +55,11 @@
if(Logger.shouldLog(Logger.MINOR, this))
Logger.minor(this, "Sending get for key "+keyNum+" :
"+key);
FetchContext ctx = getContext();
+ long now = System.currentTimeMillis();
+ if(getCooldownWakeupByKey(key.getNodeKey()) > now) {
+ Logger.error(this, "Key is still on the cooldown queue
in send() for "+this+" - key = "+key, new Exception("error"));
+ return false;
+ }
boolean logMINOR = Logger.shouldLog(Logger.MINOR, this);
synchronized (this) {
if(isCancelled()) {