2006-04-06 jrandom

* Fixed a typo in the reply cleanup code
This commit is contained in:
jrandom
2006-04-06 10:33:44 +00:00
committed by zzz
parent ac3c2d2b15
commit 5aa66795d2
4 changed files with 16 additions and 9 deletions

View File

@ -1,4 +1,7 @@
$Id: history.txt,v 1.445 2006/04/04 23:40:04 jrandom Exp $
$Id: history.txt,v 1.446 2006/04/05 12:08:04 jrandom Exp $
2006-04-06 jrandom
* Fixed a typo in the reply cleanup code
* 2006-04-05 0.6.1.14 released

View File

@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
*
*/
public class RouterVersion {
public final static String ID = "$Revision: 1.385 $ $Date: 2006/04/04 23:40:10 $";
public final static String ID = "$Revision: 1.386 $ $Date: 2006/04/05 12:08:10 $";
public final static String VERSION = "0.6.1.14";
public final static long BUILD = 0;
public final static long BUILD = 1;
public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
System.out.println("Router ID: " + RouterVersion.ID);

View File

@ -123,7 +123,8 @@ public class GarlicMessageBuilder {
long timeFromNow = config.getExpiration() - ctx.clock().now();
if (timeFromNow < 1*1000) {
log.error("Building a message expiring in " + timeFromNow + "ms: " + config, new Exception("created by"));
if (log.shouldLog(Log.WARN))
log.warn("Building a message expiring in " + timeFromNow + "ms: " + config, new Exception("created by"));
return null;
}

View File

@ -151,7 +151,8 @@ public class OutboundMessageRegistry {
if (oldMsg != null) {
List multi = null;
if (oldMsg instanceof OutNetMessage) {
multi = Collections.synchronizedList(new ArrayList(4));
//multi = Collections.synchronizedList(new ArrayList(4));
multi = new ArrayList(4);
multi.add(oldMsg);
multi.add(msg);
_selectorToMessage.put(sel, multi);
@ -222,10 +223,12 @@ public class OutboundMessageRegistry {
List msgs = null;
synchronized (_selectorToMessage) {
Object o = _selectorToMessage.remove(sel);
if (o instanceof OutNetMessage)
if (o instanceof OutNetMessage) {
msg = (OutNetMessage)o;
else if (o instanceof List)
msgs = new ArrayList((List)o);
} else if (o instanceof List) {
//msgs = new ArrayList((List)o);
msgs = (List)o;
}
}
if (msg != null) {
synchronized (_activeMessages) {
@ -239,7 +242,7 @@ public class OutboundMessageRegistry {
_activeMessages.removeAll(msgs);
}
for (int j = 0; j < msgs.size(); j++) {
msg = (OutNetMessage)msgs.get(i);
msg = (OutNetMessage)msgs.get(j);
Job fail = msg.getOnFailedReplyJob();
if (fail != null)
_context.jobQueue().addJob(fail);