plugger.py
changeset 334 b4131e5d10a4
parent 328 c23daa6996c2
child 335 c5f3f71e7260
--- a/plugger.py	Wed Apr 08 15:16:45 2009 +0200
+++ b/plugger.py	Thu Apr 09 15:27:45 2009 +0200
@@ -1476,6 +1476,13 @@
 
         self.ReArmDebugRegisterTimer()
 
+    def UnsubscribeAllDebugIECVariable(self):
+        self.IECdebug_lock.acquire()
+        IECdebug_data = {}
+        self.IECdebug_lock.release()
+
+        self.ReArmDebugRegisterTimer()        
+
     def DebugThreadProc(self):
         """
         This thread waid PLC debug data, and dispatch them to subscribers
@@ -1681,8 +1688,8 @@
                 if self._connector.NewPLC(MD5, data, extrafiles):
                     if self.PLCDebug is not None:
                         self.PLCDebug.Close()
-                        self.TracedIECPath = []
                         self.PLCDebug = None
+                    self.UnsubscribeAllDebugIECVariable()
                     self.ProgramTransferred()
                     self.logger.write("Transfer completed successfully.\n")
                 else: