From f1b55b70c2900a61aa61e51170802b15048b39d0 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Wed, 15 Dec 2021 08:10:00 -0500 Subject: [PATCH] Agent: Remove redundant check for stop in Exploiter --- monkey/infection_monkey/master/exploiter.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/monkey/infection_monkey/master/exploiter.py b/monkey/infection_monkey/master/exploiter.py index 0dfc8869f..383fc6fe3 100644 --- a/monkey/infection_monkey/master/exploiter.py +++ b/monkey/infection_monkey/master/exploiter.py @@ -59,10 +59,7 @@ class Exploiter: victim_host = hosts_to_exploit.get(timeout=QUEUE_TIMEOUT) self._run_all_exploiters(exploiters_to_run, victim_host, results_callback, stop) except queue.Empty: - if ( - _all_hosts_have_been_processed(scan_completed, hosts_to_exploit) - or stop.is_set() - ): + if _all_hosts_have_been_processed(scan_completed, hosts_to_exploit): break logger.debug(