forked from I2P_Developers/i2p.i2p
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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user