jcrodriguez-dis / moodle-mod_vpl

Virtual Programming Lab for Moodle (Module)
GNU General Public License v3.0
97 stars 84 forks source link

Use correct process ID for retrieve and cancel #186

Closed Astor-Bizard closed 1 month ago

Astor-Bizard commented 3 months ago

In VPLUI.webSocketMonitor, the retrieve and cancel actions use the global process ID from VPLUtil.getProcessId(). This may (in rare cases) lead to sending a retrieve or cancel action on the wrong process, since the global ID can be changed by subsequent processes (if for example the close signal comes a little late and the next process is launched early).

This PR fixes it. We simply use coninfo.processid which is a parameter of the websocket monitor, keeping a consistent process ID for a given monitor.

jcrodriguez-dis commented 1 month ago

Hi @Astor-Bizard,

Thank you for reporting this issue and providing a fix. This problem has been resolved manually in the 4.2.4 branch.

Best regards, Juan Carlos