diff --git a/monkey/infection_monkey/telemetry/messengers/batching_telemetry_messenger.py b/monkey/infection_monkey/telemetry/messengers/batching_telemetry_messenger.py index 9541d34d1..252a5e8a7 100644 --- a/monkey/infection_monkey/telemetry/messengers/batching_telemetry_messenger.py +++ b/monkey/infection_monkey/telemetry/messengers/batching_telemetry_messenger.py @@ -57,7 +57,7 @@ class BatchingTelemetryMessenger(ITelemetryMessenger): def _manage_telemetry_batches(self): self._reset() - while self._should_run_batch_thread: + while self._should_run_batch_thread or not self._queue.empty(): try: telemetry = self._queue.get(block=True, timeout=self._period / WAKES_PER_PERIOD)