mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-09-16 07:08:09 -04:00
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>