[traffic] Implement HttpTraffSource

Signed-off-by: mvglasow <michael -at- vonglasow.com>
This commit is contained in:
mvglasow
2025-07-20 13:14:23 +03:00
parent a20d1453e0
commit 3f58c6ee20
8 changed files with 549 additions and 8 deletions

View File

@@ -497,7 +497,8 @@ void TrafficManager::RegisterSource(std::unique_ptr<traffxml::TraffSource> sourc
UniteActiveMwms(activeMwms);
}
source->SubscribeOrChangeSubscription(activeMwms);
if (!activeMwms.empty())
source->SubscribeOrChangeSubscription(activeMwms);
{
std::lock_guard<std::mutex> lock(m_trafficSourceMutex);
@@ -699,7 +700,6 @@ void TrafficManager::ThreadRoutine()
if (hasUpdates)
OnTrafficDataUpdate();
}
// Calling Unsubscribe() from the worker thread on exit makes thread synchronization easier
Unsubscribe();
}