mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
delete obsolete profiles
This commit is contained in:
parent
1839b85d97
commit
128a8f3b48
3 changed files with 49 additions and 14 deletions
29
NetDb.cpp
29
NetDb.cpp
|
@ -65,19 +65,24 @@ namespace data
|
|||
|
||||
void NetDb::Stop ()
|
||||
{
|
||||
for (auto it: m_RouterInfos)
|
||||
it.second->SaveProfile ();
|
||||
m_RouterInfos.clear ();
|
||||
if (m_Thread)
|
||||
if (m_IsRunning)
|
||||
{
|
||||
m_IsRunning = false;
|
||||
m_Queue.WakeUp ();
|
||||
m_Thread->join ();
|
||||
delete m_Thread;
|
||||
m_Thread = 0;
|
||||
}
|
||||
m_LeaseSets.clear();
|
||||
m_Requests.Stop ();
|
||||
for (auto it: m_RouterInfos)
|
||||
it.second->SaveProfile ();
|
||||
DeleteObsoleteProfiles ();
|
||||
m_RouterInfos.clear ();
|
||||
m_Floodfills.clear ();
|
||||
if (m_Thread)
|
||||
{
|
||||
m_IsRunning = false;
|
||||
m_Queue.WakeUp ();
|
||||
m_Thread->join ();
|
||||
delete m_Thread;
|
||||
m_Thread = 0;
|
||||
}
|
||||
m_LeaseSets.clear();
|
||||
m_Requests.Stop ();
|
||||
}
|
||||
}
|
||||
|
||||
void NetDb::Run ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue