SVGHMI : wait for initial timeout after watchdog is triggered, since it generaly induces HMI restart svghmi
authorEdouard Tisserant
Thu, 23 Jan 2020 13:46:05 +0100
branchsvghmi
changeset 2832 e9ba4dee6ffb
parent 2831 6c9cfdbe94dc
child 2833 e74123b966ac
SVGHMI : wait for initial timeout after watchdog is triggered, since it generaly induces HMI restart
svghmi/svghmi_server.py
--- a/svghmi/svghmi_server.py	Thu Jan 23 11:22:09 2020 +0100
+++ b/svghmi/svghmi_server.py	Thu Jan 23 13:46:05 2020 +0100
@@ -102,14 +102,15 @@
         with self.lock:
             self._stop()
 
-    def feed(self):
+    def feed(self, rearm=True):
         with self.lock:
             self._stop()
-            self._start(rearm=True)
+            self._start(rearm)
 
     def trigger(self):
         self._callback()
-        self.feed()
+        # wait for initial timeout on re-start
+        self.feed(rearm=False)
 
 class HMIProtocol(WebSocketServerProtocol):