From a178964f2ae136291839dd6fb2fed84b830b5f7c Mon Sep 17 00:00:00 2001 From: Michael Kane Juncker Date: Thu, 18 Feb 2021 13:04:27 +0100 Subject: [PATCH] Fix all-workers-missing condition --- locust/runners.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locust/runners.py b/locust/runners.py index 2274afead7..5b384f04ae 100644 --- a/locust/runners.py +++ b/locust/runners.py @@ -608,7 +608,7 @@ def heartbeat_worker(self): logger.info("Worker %s failed to send heartbeat, setting state to missing." % str(client.id)) client.state = STATE_MISSING client.user_count = 0 - if self.worker_count - len(self.clients.missing) <= 0: + if self.worker_count <= 0: logger.info("The last worker went missing, stopping test.") self.stop() self.check_stopped()