|
@@ -56,6 +56,7 @@ PlugIn::PlugIn() :
|
|
|
m_inbounds(),
|
|
|
m_forcedToBackendCallsigns(),
|
|
|
m_compatible(false),
|
|
|
+ m_connectedToNetwork(false),
|
|
|
m_sweatboxValid(false),
|
|
|
m_playbackValid(false) {
|
|
|
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
|
@@ -655,6 +656,22 @@ void PlugIn::updateSequence(std::shared_ptr<aman::AircraftSequence>& sequence) {
|
|
|
}
|
|
|
|
|
|
void PlugIn::OnTimer(int counter) {
|
|
|
+ /* cleanup the internal data */
|
|
|
+ if (EuroScopePlugIn::CONNECTION_TYPE_NO == this->GetConnectionType()) {
|
|
|
+ if (true == this->m_connectedToNetwork) {
|
|
|
+ std::lock_guard guardUpdate(this->m_updateQueueLock);
|
|
|
+ this->m_updateQueue.clear();
|
|
|
+
|
|
|
+ std::lock_guard guardInbound(this->m_inboundsQueueLock);
|
|
|
+ this->m_inbounds.clear();
|
|
|
+
|
|
|
+ this->m_connectedToNetwork = false;
|
|
|
+ }
|
|
|
+
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ this->m_connectedToNetwork = true;
|
|
|
if (false == this->m_compatible || false == Backend::instance().initialized() || 0 != (counter % 10))
|
|
|
return;
|
|
|
|