diff --git a/src/systems/sensors/Sensors.cc b/src/systems/sensors/Sensors.cc index 4790345300..591d28b225 100644 --- a/src/systems/sensors/Sensors.cc +++ b/src/systems/sensors/Sensors.cc @@ -280,12 +280,15 @@ void SensorsPrivate::RunOnce() { { std::unique_lock cvLock(this->renderMutex); - this->renderCv.wait(cvLock, [this]() + this->renderCv.wait_for(cvLock, std::chrono::microseconds(1000), [this]() { return !this->running || this->updateAvailable; }); } + if (!this->updateAvailable) + return; + if (!this->running) return;