diff --git a/monkey/infection_monkey/master/automated_master.py b/monkey/infection_monkey/master/automated_master.py index abb19b85c..3f0f31508 100644 --- a/monkey/infection_monkey/master/automated_master.py +++ b/monkey/infection_monkey/master/automated_master.py @@ -57,6 +57,9 @@ class AutomatedMaster(IMaster): logger.warning("Timed out waiting for the simulation to stop") # Since the master thread and all child threads are daemon threads, they will be # forcefully killed when the program exits. + # TODO: Daemon threads to not die when the parent THREAD does, but when the parent + # PROCESS does. This could lead to conflicts between threads that refuse to die + # and the cleanup() function. Come up with a solution. logger.warning("Forcefully killing the simulation") def _wait_for_master_stop_condition(self): @@ -65,6 +68,8 @@ class AutomatedMaster(IMaster): while self._master_thread_should_run(): if timer.is_expired(): + # TODO: Handle exceptions in _check_for_stop() once + # ControlChannel.should_agent_stop() is refactored. self._check_for_stop() timer.reset()