mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 23:35:33 +08:00
Fixed bug in airspace monitor using the wrong timeout value
Remark: mostly uncritical as only the log message was wrong
This commit is contained in:
committed by
Mat Sutcliffe
parent
5fea046c0b
commit
68d4ce8a33
@@ -186,8 +186,8 @@ namespace BlackCore
|
|||||||
for (const CCallsign &callsign : callsignsAtc) // clazy:exclude=container-anti-pattern,range-loop
|
for (const CCallsign &callsign : callsignsAtc) // clazy:exclude=container-anti-pattern,range-loop
|
||||||
{
|
{
|
||||||
if (!enabled) { m_aircraftCallsignTimestamps[callsign] = timeoutAtcEpochMs + 1000; } // fake value so it can be re-enabled
|
if (!enabled) { m_aircraftCallsignTimestamps[callsign] = timeoutAtcEpochMs + 1000; } // fake value so it can be re-enabled
|
||||||
const qint64 tsv = m_aircraftCallsignTimestamps.value(callsign);
|
const qint64 tsv = m_atcCallsignTimestamps.value(callsign);
|
||||||
if (m_atcCallsignTimestamps.value(callsign) > timeoutAtcEpochMs) { continue; }
|
if (tsv > timeoutAtcEpochMs) { continue; }
|
||||||
CLogMessage(this).debug() << QStringLiteral("ATC '%1' timed out after %2ms").arg(callsign.toQString()).arg(currentTimeMsEpoch - tsv);
|
CLogMessage(this).debug() << QStringLiteral("ATC '%1' timed out after %2ms").arg(callsign.toQString()).arg(currentTimeMsEpoch - tsv);
|
||||||
m_atcCallsignTimestamps.remove(callsign);
|
m_atcCallsignTimestamps.remove(callsign);
|
||||||
emit this->timeoutAtc(callsign);
|
emit this->timeoutAtc(callsign);
|
||||||
|
|||||||
Reference in New Issue
Block a user