|
|
@ -42,9 +42,8 @@ namespace transport
|
|
|
|
m_ThreadV6 = new std::thread (std::bind (&SSUServer::RunV6, this));
|
|
|
|
m_ThreadV6 = new std::thread (std::bind (&SSUServer::RunV6, this));
|
|
|
|
m_ReceiversService.post (std::bind (&SSUServer::ReceiveV6, this));
|
|
|
|
m_ReceiversService.post (std::bind (&SSUServer::ReceiveV6, this));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (i2p::context.IsUnreachable ())
|
|
|
|
|
|
|
|
ScheduleIntroducersUpdateTimer ();
|
|
|
|
|
|
|
|
SchedulePeerTestsCleanupTimer ();
|
|
|
|
SchedulePeerTestsCleanupTimer ();
|
|
|
|
|
|
|
|
ScheduleIntroducersUpdateTimer (); // wait for 30 seconds and decide if we need introducers
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void SSUServer::Stop ()
|
|
|
|
void SSUServer::Stop ()
|
|
|
@ -423,9 +422,10 @@ namespace transport
|
|
|
|
|
|
|
|
|
|
|
|
void SSUServer::HandleIntroducersUpdateTimer (const boost::system::error_code& ecode)
|
|
|
|
void SSUServer::HandleIntroducersUpdateTimer (const boost::system::error_code& ecode)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!ecode)
|
|
|
|
if (ecode != boost::asio::error::operation_aborted)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// timeout expired
|
|
|
|
// timeout expired
|
|
|
|
|
|
|
|
if (!i2p::context.IsUnreachable ()) return; // we don't need introducers anymore
|
|
|
|
std::list<boost::asio::ip::udp::endpoint> newList;
|
|
|
|
std::list<boost::asio::ip::udp::endpoint> newList;
|
|
|
|
size_t numIntroducers = 0;
|
|
|
|
size_t numIntroducers = 0;
|
|
|
|
uint32_t ts = i2p::util::GetSecondsSinceEpoch ();
|
|
|
|
uint32_t ts = i2p::util::GetSecondsSinceEpoch ();
|
|
|
|