mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-08-03 00:37:21 -04:00
The capture daemons and this watchdog share the database. If the DB (or the host/network) drops out, every zmc stops updating its shared-memory heartbeat at the same instant. When the DB connection recovers, the next check pass saw the whole fleet as simultaneously stale and restarted -- and, for cameras with control capability, rebooted -- every monitor, even though none of them individually failed. Track wall-clock time between check passes. If we just came out of a DB reconnect, or far more time elapsed than a normal check interval (host stall/clock step), skip restart+reboot actions for one pass so capture daemons can refresh their heartbeats. A genuinely dead camera is still stale next pass and gets handled normally -- reboot behaviour is preserved, just no longer fired on a false fleet-wide positive. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HoNiNxwgyaHV29CbiueCUf