From b95b49bd193c34c59a6aedf75a599fc300492890 Mon Sep 17 00:00:00 2001 From: orignal Date: Thu, 26 Feb 2015 19:19:03 -0500 Subject: [PATCH] start unsing introducers after firewall detection --- SSU.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SSU.cpp b/SSU.cpp index 1987eb0e..be5902b1 100644 --- a/SSU.cpp +++ b/SSU.cpp @@ -41,10 +41,9 @@ namespace transport { m_ThreadV6 = new std::thread (std::bind (&SSUServer::RunV6, this)); m_ReceiversService.post (std::bind (&SSUServer::ReceiveV6, this)); - } - if (i2p::context.IsUnreachable ()) - ScheduleIntroducersUpdateTimer (); + } SchedulePeerTestsCleanupTimer (); + ScheduleIntroducersUpdateTimer (); // wait for 30 seconds and decide if we need introducers } void SSUServer::Stop () @@ -423,9 +422,10 @@ namespace transport void SSUServer::HandleIntroducersUpdateTimer (const boost::system::error_code& ecode) { - if (!ecode) + if (ecode != boost::asio::error::operation_aborted) { // timeout expired + if (!i2p::context.IsUnreachable ()) return; // we don't need introducers anymore std::list newList; size_t numIntroducers = 0; uint32_t ts = i2p::util::GetSecondsSinceEpoch ();