Skip to content
Snippets Groups Projects
Commit a4f50da1 authored by Eric Cano's avatar Eric Cano
Browse files

cta/CTA#46: Fixed get_future wrongly called several times.

parent 54228e40
Branches
Tags
No related merge requests found
......@@ -34,8 +34,9 @@ void AgentHeartbeatThread::stopAndWaitThread() {
//------------------------------------------------------------------------------
void AgentHeartbeatThread::run() {
log::LogContext lc(m_logger);
auto exitFuture = m_exit.get_future();
try {
while (std::future_status::ready != m_exit.get_future().wait_for(m_heartRate)) {
while (std::future_status::ready != exitFuture.wait_for(m_heartRate)) {
m_agentReference.bumpHeatbeat(m_backend);
}
} catch (cta::exception::Exception & ex) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment