2007-06-27 jrandom

* fix for a streaming lib bug that could leave a thread waiting
      indefinitely (thanks Complication!)
This commit is contained in:
jrandom
2007-06-28 01:51:16 +00:00
committed by zzz
parent 30c99e630b
commit 71aaf03d09
3 changed files with 16 additions and 6 deletions

View File

@ -29,9 +29,15 @@ public class I2PSocketFull implements I2PSocket {
if (c == null) return;
if (c.getIsConnected()) {
OutputStream out = c.getOutputStream();
if (out != null)
out.close();
c.disconnect(true);
if (out != null) {
try {
out.close();
} catch (IOException ioe) {
// ignore any write error, as we want to keep on and kill the
// con (thanks Complication!)
}
}
c.disconnect(true);
} else {
//throw new IOException("Not connected");
}