Skip to content

Commit a53e362

Browse files
cakekoamssalvatore
authored andcommitted
Agent: Add a comment about startup/stop order
1 parent c17781e commit a53e362

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

monkey/infection_monkey/monkey.py

+2
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ def start(self):
220220

221221
logger.info("Agent is starting...")
222222

223+
# This check must be done after the agent event forwarder is started, otherwise the agent
224+
# will be unable to send a shutdown event to the Island.
223225
should_stop = self._control_channel.should_agent_stop()
224226
if should_stop:
225227
logger.info("The Monkey Island has instructed this agent to stop")

0 commit comments

Comments
 (0)