LegacyEndpointCache work

This commit is contained in:
Vinnie Falco
2013-10-04 20:38:46 -07:00
parent bb29c8ba85
commit dc8420d32d
8 changed files with 317 additions and 264 deletions

View File

@@ -189,7 +189,6 @@ public:
Logic m_logic;
DeadlineTimer m_connectTimer;
DeadlineTimer m_endpointsTimer;
RelativeTime m_whenStoreLegacyEndpoints;
//--------------------------------------------------------------------------
@@ -311,18 +310,6 @@ public:
}
}
// Checks to see if its time to update legacy endpoints
void storeLegacyEndpoints()
{
RelativeTime const now (RelativeTime::fromStartup());
if (now >= m_whenStoreLegacyEndpoints)
{
m_logic.storeLegacyEndpoints ();
m_whenStoreLegacyEndpoints = now
+ RelativeTime (legacyEndpointUpdateSeconds);
}
}
void init ()
{
m_journal.debug << "Initializing";
@@ -355,14 +342,10 @@ public:
{
m_journal.debug << "Started";
m_whenStoreLegacyEndpoints = RelativeTime::fromStartup()
+ RelativeTime (legacyEndpointUpdateSeconds);
init ();
while (! this->threadShouldExit())
{
storeLegacyEndpoints();
m_queue.run_one();
}