diff --git a/objectstore/AgentWatchdog.hpp b/objectstore/AgentWatchdog.hpp index 64d3f2f3be940e549669de0d81cc3a5fbfa4a4f9..f0201b2ec0865fc2ed0075e51407f1bc684bf944 100644 --- a/objectstore/AgentWatchdog.hpp +++ b/objectstore/AgentWatchdog.hpp @@ -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;