2004-11-14 jrandom

* Fix a long standing leak in I2PTunnel (hanging on to i2psocket objects)
    * Fix a leak injected into the SimpleTimer
    * Fix a race condition in the tunnel message handling
This commit is contained in:
jrandom
2004-11-15 14:35:16 +00:00
committed by zzz
parent ad7dc66f90
commit 3780d290fa
10 changed files with 62 additions and 19 deletions

View File

@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
*
*/
public class RouterVersion {
public final static String ID = "$Revision: 1.74 $ $Date: 2004/11/10 07:33:01 $";
public final static String ID = "$Revision: 1.75 $ $Date: 2004/11/13 04:43:35 $";
public final static String VERSION = "0.4.1.4";
public final static long BUILD = 3;
public final static long BUILD = 4;
public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION);
System.out.println("Router ID: " + RouterVersion.ID);

View File

@ -331,7 +331,6 @@ public class HandleTunnelMessageJob extends JobImpl {
}
private void sendToTunnel(Hash router, TunnelId id, I2NPMessage body) {
// TODO: we may want to send it via a tunnel later on, but for now, direct will do.
if (_log.shouldLog(Log.DEBUG))
_log.debug("Sending on to requested tunnel " + id.getTunnelId() + " on router "
+ router.toBase64());
@ -341,6 +340,11 @@ public class HandleTunnelMessageJob extends JobImpl {
timeoutMs = FORWARD_TIMEOUT;
TunnelInfo curInfo = getContext().tunnelManager().getTunnelInfo(_message.getTunnelId());
if (curInfo == null) {
if (_log.shouldLog(Log.WARN))
_log.warn("Tunnel went away (" + _message.getTunnelId() + ")");
return;
}
if (curInfo.getTunnelId().getType() != TunnelId.TYPE_INBOUND) {
// we are not processing a request at the end of an inbound tunnel, so
// there's no reason to hide our location. honor the request directly