2005-12-16 jrandom

* Refuse torrents with too many files (128), avoiding ulimit errors.
    * Remove an fd leak in I2PSnark
    * Further I2PSnark web UI cleanup
This commit is contained in:
jrandom
2005-12-16 08:24:21 +00:00
committed by zzz
parent 2a922098d6
commit 7726bd1a5c
8 changed files with 114 additions and 27 deletions

View File

@@ -254,8 +254,9 @@ public class TrackerClient extends Thread
throw new IOException("Error fetching " + s);
}
InputStream in = null;
try {
InputStream in = new FileInputStream(fetched);
in = new FileInputStream(fetched);
TrackerInfo info = new TrackerInfo(in, coordinator.getID(),
coordinator.getMetaInfo());
@@ -270,6 +271,7 @@ public class TrackerClient extends Thread
interval = info.getInterval() * 1000;
return info;
} finally {
if (in != null) try { in.close(); } catch (IOException ioe) {}
fetched.delete();
}
}