mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-10-28 17:28:33 -04:00
The command socket stayed bound until ~StreamBase(), which runs only after the stream thread has finished. A zms that was shutting down but still busy in the stream thread (blocked writing to a client that had gone away, for instance) kept accepting commands it would never read. web/ajax/stream.php then waited out its whole MSG_TIMEOUT on each one and logged "Timed out waiting for msg ... after waiting 5000 milliseconds", where a missing socket would have been reported as no_socket at once. Call closeComms() when checkCommandQueue() leaves its loop. sd is only used from the command thread, and closeComms() clears sd and lock_fd, so the destructor's later call does nothing and cannot remove a socket bound by a successor zms on the same connkey. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>