Correcting initialization order in FetchManager
Change-Id: I4c4a5f564b13b8d6ced379487a701d44df53b1f0
diff --git a/src/fetch-manager.cc b/src/fetch-manager.cc
index e01df78..7e087ce 100644
--- a/src/fetch-manager.cc
+++ b/src/fetch-manager.cc
@@ -59,15 +59,14 @@
m_scheduler->start ();
m_executor->start();
+ m_scheduleFetchesTask = Scheduler::schedulePeriodicTask (m_scheduler,
+ make_shared<SimpleIntervalGenerator> (300), // no need to check to often. if needed, will be rescheduled
+ bind (&FetchManager::ScheduleFetches, this), SCHEDULE_FETCHES_TAG);
// resume un-finished fetches if there is any
if (m_taskDb)
{
m_taskDb->foreachTask(bind(&FetchManager::Enqueue, this, _1, _2, _3, _4, _5));
}
-
- m_scheduleFetchesTask = Scheduler::schedulePeriodicTask (m_scheduler,
- make_shared<SimpleIntervalGenerator> (300), // no need to check to often. if needed, will be rescheduled
- bind (&FetchManager::ScheduleFetches, this), SCHEDULE_FETCHES_TAG);
}
FetchManager::~FetchManager ()