From a2bba6a0252c5d9196525c6b2d5502ba5fbdd430 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Wed, 1 Dec 2021 13:47:17 -0500 Subject: [PATCH] Agent: Implement _check_for_stop() in AutomatedMaster --- monkey/infection_monkey/master/automated_master.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/monkey/infection_monkey/master/automated_master.py b/monkey/infection_monkey/master/automated_master.py index 7e775d484..97036cd6b 100644 --- a/monkey/infection_monkey/master/automated_master.py +++ b/monkey/infection_monkey/master/automated_master.py @@ -34,7 +34,9 @@ class AutomatedMaster(IMaster): logger.info("The simulation has been shutdown.") def _check_for_stop(self): - pass + if self._control_channel.should_agent_stop(): + logger.debug('Received the "stop" signal from the Island') + self._stop.set() def terminate(self): logger.info("Stopping automated breach and attack simulation")