* i2psnark: Fix DHT nodes not being saved at shutdown

Log infohashes in hex
             Don't write out nodes if we don't have any
This commit is contained in:
zzz
2012-08-11 11:23:27 +00:00
parent d2a5595df2
commit a6a0228ef8
4 changed files with 25 additions and 4 deletions

View File

@ -37,6 +37,8 @@ import net.i2p.util.SecureFileOutputStream;
import net.i2p.util.SimpleScheduler;
import net.i2p.util.SimpleTimer;
import org.klomp.snark.dht.DHT;
/**
* Manage multiple snarks
*/
@ -1752,6 +1754,9 @@ public class SnarkManager implements Snark.CompleteListener {
}
if (_util.connected()) {
if (count > 0) {
DHT dht = _util.getDHT();
if (dht != null)
dht.stop();
// Schedule this even for final shutdown, as there's a chance
// that it's just this webapp that is stopping.
_context.simpleScheduler().addEvent(new Disconnector(), 60*1000);