Author: toad
Date: 2008-01-25 17:27:53 +0000 (Fri, 25 Jan 2008)
New Revision: 17284
Modified:
trunk/freenet/src/freenet/io/comm/MessageCore.java
Log:
The old logic works, as long as timedOut() returns true on a message filter
which has already been matched.
Modified: trunk/freenet/src/freenet/io/comm/MessageCore.java
===================================================================
--- trunk/freenet/src/freenet/io/comm/MessageCore.java 2008-01-25 17:23:10 UTC
(rev 17283)
+++ trunk/freenet/src/freenet/io/comm/MessageCore.java 2008-01-25 17:27:53 UTC
(rev 17284)
@@ -110,10 +110,12 @@
i.remove();
_timedOutFilters.add(f);
} else {
- // Because f.timedOut() may return true
prematurely if the message-
- // filter is obsolete, we should not
abort the iteration as soon as
- // we find one that doesn't timeout.
Although, in theory we could
- // because of the order of the list (by
earliest timeout first).
+ // Because _filters are in order of
timeout, we
+ // can abort the iteration as soon as
we find one that
+ // doesn't timeout
+ if(Logger.shouldLog(Logger.DEBUG, this))
+ Logger.debug(this, "Stopping
removing timed out filters at "+f+" : timeout = "+f.getTimeout()+" initial
timeout = "+f.getInitialTimeout());
+ break;
}
}
}