Skip to content

Conversation

@IgorA100
Copy link
Contributor

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

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)
@connortechnology
Copy link
Member

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.

@IgorA100
Copy link
Contributor Author

IgorA100 commented Aug 29, 2025

That isn't going to do it.

Why? It works fine for me! I'm debugging JS now.

The zms cgi needs a keepalive parameter

Yeah, I agree. That would be a great option. But I don't know how to do it :(
If you did this in C++, I would arrange for a command to be sent to maintain the connection.

We can't depend on CMD_QUIT.

Yeah, but it's better than relying on SIGPIPE alone

@IgorA100
Copy link
Contributor Author

This PR works!
But of course it is better to use keepalive for ZMS

@IgorA100
Copy link
Contributor Author

@connortechnology
In this PR we add a attribute to the IMG so that we can send a command to the server where the monitor is served. This attribute will also be needed if you implement keepalive for ZMS. If keepalive is implemented for ZMS, then a very small change will need to be made to skin.js.
This PR works, but I certainly like the implementation of keepalive for ZMS more, but I can't do it in C++

@IgorA100 IgorA100 marked this pull request as ready for review August 31, 2025 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ZMS process is not killed on Console page after cursor leaves monitor image

2 participants