SVGHMI: watchdog now calls OnStart and OnStop commands just after calling OnWatchdog. Therefore, OnWatchdog command should not restart browser by itself.
authorEdouard Tisserant
Tue, 08 Nov 2022 11:02:35 +0100
changeset 3662 364f2409eeda
parent 3661 62860665fa94
child 3663 31aaec736e4d
SVGHMI: watchdog now calls OnStart and OnStop commands just after calling OnWatchdog. Therefore, OnWatchdog command should not restart browser by itself.
svghmi/svghmi.py
--- a/svghmi/svghmi.py	Tue Nov 08 11:00:42 2022 +0100
+++ b/svghmi/svghmi.py	Tue Nov 08 11:02:35 2022 +0100
@@ -652,8 +652,10 @@
     global browser_proc
     restart_proc = {svghmi_cmds[Watchdog]}
     waitpid_timeout(restart_proc, "SVGHMI watchdog triggered command")
+    stop_proc = {svghmi_cmds[Stop]}
+    waitpid_timeout(stop_proc, "SVGHMI stop command")
     waitpid_timeout(browser_proc, "SVGHMI browser process")
-    browser_proc = None
+    browser_proc = {svghmi_cmds[Start]}
 
 max_svghmi_sessions = {maxConnections_total}