Fix: After the cursor leaves Thumbs, ZMS must always be stopped, even in case of network problems.#4430
Fix: After the cursor leaves Thumbs, ZMS must always be stopped, even in case of network problems.#4430IgorA100 wants to merge 12 commits intoZoneMinder:masterfrom
Conversation
Next we will use this attribute to stop the ZMS process after the cursor leaves the image by sending the CMD_QUIT command.
… can send ZMS the CMD_QUIT command without using MonitorStream. (monitor.php)
… can send ZMS the CMD_QUIT command without using MonitorStream. (console.php)
Here adding the attribute is not necessary, because when hovering the cursor ZMS does not start at the moment. I added it for consistency. It will not make things worse.
… can send ZMS the CMD_QUIT command without using MonitorStream. (watch.php)
|
That isn't going to do it. We need a keepalive. The zms cgi needs a keepalive parameter, so that if it doesn't get a status update request after so many seconds, it dies. We can't depend on CMD_QUIT. |
Why? It works fine for me! I'm debugging JS now.
Yeah, I agree. That would be a great option. But I don't know how to do it :(
Yeah, but it's better than relying on SIGPIPE alone |
|
This PR works! |
|
@connortechnology |
|
@connortechnology |
|
Is it still needed? There have been a few changes that may have made it obsolete. |
I'm not sure, but it's likely necessary. I have one server that hasn't been updated in a long time and it uses this PR. Some other servers don't use a domain name, just an IP address, and there are no problems. I'll need to retest this PR in more detail with the current code.
This was the fastest solution with minimal code changes. I think it's possible to skip urltoindex and get the data using JS. |
For all Thumbs we will assign the attribute "data-monitor-url" so that we can send ZMS the CMD_QUIT command without using MonitorStream.
We should not rely only on SIGPIPE, we must terminate ZMS correctly in any case.
Closed #4418