2007-01-27 zzz

* i2psnark: Fix orphaned Snark reader tasks leading to OOMs
This commit is contained in:
zzz
2007-01-28 02:30:05 +00:00
committed by zzz
parent 58f10d14b2
commit 0fd41a9490
3 changed files with 14 additions and 4 deletions

View File

@ -33,7 +33,7 @@ class PeerConnectionIn implements Runnable
private final DataInputStream din; private final DataInputStream din;
private Thread thread; private Thread thread;
private boolean quit; private volatile boolean quit;
public PeerConnectionIn(Peer peer, DataInputStream din) public PeerConnectionIn(Peer peer, DataInputStream din)
{ {
@ -51,6 +51,13 @@ class PeerConnectionIn implements Runnable
Thread t = thread; Thread t = thread;
if (t != null) if (t != null)
t.interrupt(); t.interrupt();
if (din != null) {
try {
din.close();
} catch (IOException ioe) {
_log.warn("Error closing the stream from " + peer, ioe);
}
}
} }
public void run() public void run()

View File

@ -1,4 +1,7 @@
$Id: history.txt,v 1.543 2007-01-20 22:35:49 complication Exp $ $Id: history.txt,v 1.544 2007-01-20 22:49:41 complication Exp $
2007-01-27 zzz
* i2psnark: Fix orphaned Snark reader tasks leading to OOMs
2007-01-20 Complication 2007-01-20 Complication
* Drop overlooked comment * Drop overlooked comment

View File

@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
* *
*/ */
public class RouterVersion { public class RouterVersion {
public final static String ID = "$Revision: 1.479 $ $Date: 2007-01-20 22:35:50 $"; public final static String ID = "$Revision: 1.480 $ $Date: 2007-01-20 22:49:41 $";
public final static String VERSION = "0.6.1.26"; public final static String VERSION = "0.6.1.26";
public final static long BUILD = 13; public final static long BUILD = 14;
public static void main(String args[]) { public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION + "-" + BUILD); System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
System.out.println("Router ID: " + RouterVersion.ID); System.out.println("Router ID: " + RouterVersion.ID);