mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-08 22:13:48 +01:00
cleanup introducers upon reschedule
This commit is contained in:
parent
8bb9a57908
commit
b9970e1908
1 changed files with 4 additions and 0 deletions
|
@ -941,6 +941,8 @@ namespace transport
|
||||||
if (m_IsPublished)
|
if (m_IsPublished)
|
||||||
{
|
{
|
||||||
m_IntroducersUpdateTimer.cancel ();
|
m_IntroducersUpdateTimer.cancel ();
|
||||||
|
i2p::context.ClearSSU2Introducers (true);
|
||||||
|
m_Introducers.clear ();
|
||||||
m_IntroducersUpdateTimer.expires_from_now (boost::posix_time::seconds(SSU2_KEEP_ALIVE_INTERVAL/2));
|
m_IntroducersUpdateTimer.expires_from_now (boost::posix_time::seconds(SSU2_KEEP_ALIVE_INTERVAL/2));
|
||||||
m_IntroducersUpdateTimer.async_wait (std::bind (&SSU2Server::HandleIntroducersUpdateTimer,
|
m_IntroducersUpdateTimer.async_wait (std::bind (&SSU2Server::HandleIntroducersUpdateTimer,
|
||||||
this, std::placeholders::_1, true));
|
this, std::placeholders::_1, true));
|
||||||
|
@ -962,6 +964,8 @@ namespace transport
|
||||||
if (m_IsPublished)
|
if (m_IsPublished)
|
||||||
{
|
{
|
||||||
m_IntroducersUpdateTimerV6.cancel ();
|
m_IntroducersUpdateTimerV6.cancel ();
|
||||||
|
i2p::context.ClearSSU2Introducers (false);
|
||||||
|
m_IntroducersV6.clear ();
|
||||||
m_IntroducersUpdateTimerV6.expires_from_now (boost::posix_time::seconds(SSU2_KEEP_ALIVE_INTERVAL/2));
|
m_IntroducersUpdateTimerV6.expires_from_now (boost::posix_time::seconds(SSU2_KEEP_ALIVE_INTERVAL/2));
|
||||||
m_IntroducersUpdateTimerV6.async_wait (std::bind (&SSU2Server::HandleIntroducersUpdateTimer,
|
m_IntroducersUpdateTimerV6.async_wait (std::bind (&SSU2Server::HandleIntroducersUpdateTimer,
|
||||||
this, std::placeholders::_1, false));
|
this, std::placeholders::_1, false));
|
||||||
|
|
Loading…
Add table
Reference in a new issue