diff --git a/locust/runners.py b/locust/runners.py index 67bf831f30..699e0103c6 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()