diff --git a/Script/cs/Threads/CheckThread.py b/Script/cs/Threads/CheckThread.py index 85042c57607a9f12eb38160f8cbfb88a0e0e927e..1880cb34d755fa054b1ac1dff538a602ae654596 100644 --- a/Script/cs/Threads/CheckThread.py +++ b/Script/cs/Threads/CheckThread.py @@ -38,7 +38,7 @@ class CheckThread(threading.Thread): ##### Define Thread internal variables ##### self.exitFlag = False - self.ers_flag = True + self.partition_connected = True ##### Set Logger for CheckThread ##### self.logFile = os.path.join(self.LogDir,'CheckLog.out') @@ -74,17 +74,17 @@ class CheckThread(threading.Thread): return ##### Check for a new partition ##### - if self.IPCPartition(self.partition).isValid() and not self.ers_flag: + if self.IPCPartition(self.partition).isValid() and not self.partition_connected: self.event.wait(self.ERSTimeout) self.check_logger.warning('Found partition %s, adding ERS', self.partition) - self.ers_flag = True + self.partition_connected = True ##### Add ERS handlers to all loggers ##### self.change_state_ers(True) ##### Check for the disappearance of partition ##### - elif self.ers_flag and not self.IPCPartition(self.partition).isValid(): + elif self.partition_connected and not self.IPCPartition(self.partition).isValid(): self.check_logger.warning('Lost connection to partition %s, removing ERS handlers', self.partition) - self.ers_flag = False + self.partition_connected = False ##### Remove ERS handlers from all loggers ##### self.change_state_ers(False) self.event.wait(self.CheckTimeout)