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

Fixed error condition when polling a gone agent.

parent a7ea6b60
No related branches found
No related tags found
No related merge requests found
......@@ -31,7 +31,14 @@ public:
}
bool checkAlive() {
uint64_t newHeartBeatCount = readHeartbeat();
uint64_t newHeartBeatCount;
try {
newHeartBeatCount = readHeartbeat();
} catch (Backend::NoSuchObject &) {
// The agent could be gone. This is not an error. Mark it as alive,
// and will be trimmed later.
return true;
}
auto timer = m_timer.secs();
if (newHeartBeatCount == m_heartbeatCounter && timer > m_timeout)
return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment