From a02fd923ba0270bc8eadd8338750abf8e521cec2 Mon Sep 17 00:00:00 2001 From: Michael Nester Date: Tue, 20 Sep 2022 08:59:18 -0400 Subject: [PATCH] Removing the _update_user_dispatcher method from web.py as it isn't necessary and causes the user count to reset --- locust/web.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/locust/web.py b/locust/web.py index 8b892f1875..673317ff09 100644 --- a/locust/web.py +++ b/locust/web.py @@ -184,10 +184,6 @@ def swarm() -> Response: else: self._update_shape_class(form_data_shape_class_name) - # Setting user dispatchers to None so that the runners recreate the - # UserDistpatcher with the appropriate user classes - self._reset_users_dispatcher() - parsed_options_dict = vars(environment.parsed_options) if environment.parsed_options else {} run_time = None for key, value in request.form.items(): @@ -583,6 +579,3 @@ def _update_user_classes(self, user_classes): def _stop_runners(self): self.environment.runner.stop() - - def _reset_users_dispatcher(self): - self.environment.runner._users_dispatcher = None