mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-11-04 11:43:05 -05:00
An event open when its zmc is killed (lost stop, OOM, crash) keeps EndDateTime NULL. Nothing closes it on a default install: zmaudit only does with ZM_RUN_AUDIT on and after ZM_AUDIT_MIN_AGE, and the next zmc does not look at earlier events. A running zmc closes its event before it reconnects and sets startup_time in shared memory after it connects, so an open event of its monitor that started before that time belongs to a process that is gone. Once per zmc start, when its heartbeat is fresh, zmwatch closes those events through Event::Close(). Only this server's monitors are checked, and re-analysis events (Cause 'Re-analysis', created by zma with their original times) are left alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>