forked from I2P_Developers/i2p.i2p
Drastically reduces the interface of the FNDS/SNDF, force the use of explicit accessors, refactor FNDS/SNDF
This commit is contained in:
@@ -1335,31 +1335,9 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2
|
||||
_availabilityNotifier.stopNotifying();
|
||||
closeSocket();
|
||||
_subsessionMap.clear();
|
||||
clearOldNetDB();
|
||||
if (_sessionListener != null) _sessionListener.disconnected(this);
|
||||
}
|
||||
|
||||
private void clearOldNetDB() {
|
||||
Destination myDest = getMyDestination();
|
||||
if (myDest != null) {
|
||||
String base32 = myDest.toBase32();
|
||||
if (base32 != null) {
|
||||
String dbid = "clients_"+base32;
|
||||
// get the netDb directory
|
||||
File netDbDir = new File(_context.getConfigDir(), "netDb");
|
||||
File subNetDbDir = new File(netDbDir, dbid);
|
||||
if (subNetDbDir.exists()) {
|
||||
subNetDbDir.delete();
|
||||
}
|
||||
File baseNetDbDir = new File(_context.getConfigDir(), "netDb");
|
||||
File baseSubNetDbDir = new File(baseNetDbDir, dbid);
|
||||
if (baseSubNetDbDir.exists()) {
|
||||
baseSubNetDbDir.delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Close the socket carefully.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user