- 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

@@ -261,7 +261,8 @@ public class I2PSnarkUtil {
// FIXME this can cause race NPEs elsewhere
_manager = null;
_shitlist.clear();
mgr.destroySocketManager();
if (mgr != null)
mgr.destroySocketManager();
// this will delete a .torrent file d/l in progress so don't do that...
FileUtil.rmdir(_tmpDir, false);
// in case the user will d/l a .torrent file next...
@@ -405,6 +406,7 @@ public class I2PSnarkUtil {
byte[] b = Base32.decode(ip.substring(0, BASE32_HASH_LENGTH));
if (b != null) {
Hash h = new Hash(b);
//Hash h = Hash.create(b);
if (_log.shouldLog(Log.INFO))
_log.info("Using existing session for lookup of " + ip);
try {