...
This commit is contained in:
@@ -387,13 +387,15 @@ public:
|
||||
return MccTelemetryErrorCode::ERROR_NULLPTR;
|
||||
}
|
||||
|
||||
std::unique_lock thread_lock(*_updateMutex);
|
||||
std::unique_lock ulock(*_updateMutex);
|
||||
|
||||
auto res = _updateCondVar->wait_for(thread_lock, timeout, [this]() { return _updated; });
|
||||
auto res = _updateCondVar->wait_for(ulock, timeout, [this]() { return _updated; });
|
||||
if (res == std::cv_status::timeout) {
|
||||
return MccTelemetryErrorCode::ERROR_DATA_TIMEOUT;
|
||||
}
|
||||
|
||||
std::lock_guard thread_lock{*_updateMutex};
|
||||
|
||||
if (!_lastUpdateError) {
|
||||
mcc_copy_telemetry_data(_data, tdata);
|
||||
}
|
||||
@@ -424,7 +426,7 @@ public:
|
||||
{
|
||||
std::lock_guard lock{*_updateMutex};
|
||||
|
||||
return _setTargetFunc();
|
||||
return _setTargetFunc(pt);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user