Files
zoneminder/scripts
Isaac ConnorandClaude Opus 5 f796053c2a fix: reconnect to db instead of bare ping in zmupdate and zmfilter loops
Both loops called $dbh->ping() and discarded the result. ping() only tests
the connection; DBD::mysql does not reconnect on its own since
mysql_auto_reconnect is off. zmupdate's update-check loop sleeps 3600s
between iterations, so on a server with wait_timeout below an hour the
handle is already closed on wake-up and the following zmDbDo fails with
"The client was disconnected by the server because of inactivity".

zmDbConnect() already pings and reconnects when needed, and assigns the
package global $dbh that zmDbDo uses, so call that instead. zmupdate keeps
passing mysql_multi_statements so a reconnect matches the original handle.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-07 10:27:36 -04:00
..