From 1d60cb160b03fc9ed463399f3d6020e0cb6b4f03 Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Tue, 13 Sep 2022 18:51:25 +0530 Subject: [PATCH] Agent: Clear event batches set and use correct variable name in send_all_events_to_island.py --- monkey/infection_monkey/send_all_events_to_island.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/monkey/infection_monkey/send_all_events_to_island.py b/monkey/infection_monkey/send_all_events_to_island.py index 35f24892c..793b59501 100644 --- a/monkey/infection_monkey/send_all_events_to_island.py +++ b/monkey/infection_monkey/send_all_events_to_island.py @@ -67,7 +67,7 @@ class send_all_events_to_island: timer = Timer() timer.set(self._time_period) - self._event_batch = {} + self._event_batch.clear() while self._should_run_batch_and_send_thread: self._add_next_event_to_batch() @@ -75,7 +75,7 @@ class send_all_events_to_island: if timer.is_expired(): self._send_events_to_island() timer.reset() - self._event_batch = {} + self._event_batch.clear() self._send_remaining_events() @@ -98,7 +98,7 @@ class send_all_events_to_island: ) except Exception as exc: logger.warning( - f"Exception caught when connecting to the Island at {self.server_address}" + f"Exception caught when connecting to the Island at {self._server_address}" f": {exc}" )