mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-07 03:34:15 +00:00
stop netdb tread immediately on termination
This commit is contained in:
parent
610e9e3660
commit
f30a466bec
@ -87,6 +87,7 @@ namespace data
|
|||||||
if (m_Thread)
|
if (m_Thread)
|
||||||
{
|
{
|
||||||
m_IsRunning = false;
|
m_IsRunning = false;
|
||||||
|
m_Queue.WakeUp ();
|
||||||
m_Thread->join ();
|
m_Thread->join ();
|
||||||
delete m_Thread;
|
delete m_Thread;
|
||||||
m_Thread = 0;
|
m_Thread = 0;
|
||||||
@ -128,8 +129,10 @@ namespace data
|
|||||||
msg = m_Queue.Get ();
|
msg = m_Queue.Get ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // if no new DatabaseStore coming, explore it
|
else
|
||||||
{
|
{
|
||||||
|
if (!m_IsRunning) break;
|
||||||
|
// if no new DatabaseStore coming, explore it
|
||||||
auto numRouters = m_RouterInfos.size ();
|
auto numRouters = m_RouterInfos.size ();
|
||||||
Explore (numRouters < 1500 ? 5 : 1);
|
Explore (numRouters < 1500 ? 5 : 1);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user