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