- Add persistent local DHT storage

- Shutdown now closes tunnel
- Delay after sending stop announces at shutdown
- Stub out using Hash cache
- Implement stop for all cleaners
- Log tweaks
This commit is contained in:
zzz
2012-06-04 22:34:56 +00:00
parent a6f7761544
commit 3f40487c99
7 changed files with 216 additions and 30 deletions

View File

@ -1514,15 +1514,23 @@ public class SnarkManager implements Snark.CompleteListener {
}
}
public class SnarkManagerShutdown extends I2PAppThread {
private class SnarkManagerShutdown extends I2PAppThread {
@Override
public void run() {
Set names = listTorrentFiles();
int running = 0;
for (Iterator iter = names.iterator(); iter.hasNext(); ) {
Snark snark = getTorrent((String)iter.next());
if ( (snark != null) && (!snark.isStopped()) )
if (snark != null && !snark.isStopped()) {
snark.stopTorrent();
running++;
}
}
_snarks.clear();
if (running > 0) {
try { sleep(1500); } catch (InterruptedException ie) {};
}
_util.disconnect();
}
}